All Questions
425
questions
0
votes
1
answer
32
views
Unix Sockets as Portrayed via Netstat
I do not have much experience with Unix sockets, but I hope this is the place to start. I want to start with understanding what is going on with a netstat -n command. Is it normal behavior to have ...
1
vote
1
answer
102
views
Issue when creating a new user and group on macOS
I need to create a user and a group called postgres on my mac but I seem to have issues with that. The reason for needing this user is because I've installed postgresql@15 via brew and it created a ...
0
votes
3
answers
71
views
display path to files with same names
with this command in Terminal:
ls -R |sort | uniq -d | sort -r
I can display a list of files with the same names located in the running directory and subdirectories.
But I would like to display also ...
0
votes
1
answer
100
views
How to run Homebrew service with flags?
I'm running on macOS Sonoma and trying to run this service called AutoRaise. Someone made a Homebrew package for it here. I installed it using Homebrew with my desired flag, brew install autoraise --...
0
votes
0
answers
54
views
Synchronize files based only on the existence of unique filenames (Mac OS / Unix)
I am looking for a way to synchronize two folders/volumes based only on whether a filename exists in folder A but not in folder B. I want the sync to completely ignore path and modification dates. ...
1
vote
1
answer
1k
views
How do I create a shell script that will exit the ssh session after executing the remote commands
I'm trying to write a bash script to compile and deploy some code to a remote server. So far I have been struggling to figure out how to get the script to exit the ssh session. I thought I could just ...
0
votes
2
answers
48
views
Does the unix words file change over time or between systems? [closed]
Is the Unix "words" file (e.g at /usr/share/dict/words) pretty standard? I.e, can I generally rely on, for example, the 200th word in the file to be the same word between a fedora and an ...
0
votes
0
answers
404
views
Strange ln Login item
I was going through my login background tasks and saw the following:
Not sure why ln would have a startup task. As far as I know, that's just the link command from Unix. Clicking the info led me to ...
1
vote
0
answers
612
views
How to mount NAS volume via. Terminal /command line without additional prompts on OSX
I remotely manage a Mac Mini at home when I am away. We also have a Synology NAS that I use for various additional storage and backups. Sometimes, if there is WiFi or internet issues, the Mac Mini ...
0
votes
1
answer
146
views
how to make Google Drive put files in old directory (~/Google Drive/) instead of new directory (~/Google Drive/My Drive/)
Background
I am using Google Drive for Desktop on two Mac laptops. Both are running "Catalina" (MacOS 10.15). I would like to be able to sync between them and have the filepaths be the same ...
1
vote
1
answer
1k
views
IntelliJ quits abruptly in the Apple M1
I use Apple M1 and IntelIJ keeps shut down often when I login into the computer in the morning and I need to restart the app. Also, sometimes the IntelliJ just freezes and I need to force quit to ...
0
votes
0
answers
110
views
Execute a program with a sequential list of files
I have a list of files with titles like the following:
file_0.10_180.0degrees.txt
file_0.15_180.0degrees.txt
file_0.20_180.0degrees.txt
file_0.25_180.0degrees.txt
where the files can be passed in as ...
0
votes
1
answer
406
views
Equivalent of /dev/full on OSX
I want some special file which throws an error when I write to it. /dev/full does that on Linux. I don't care too much about the specific error.
1
vote
0
answers
2k
views
'cd' and other commands are very slow in my terminal
I am a new mac user and my zsh terminal takes a few seconds to open when I start it and commands like cd, docker ps, any git status take seconds to execute, while others like ls are super fast.
Could ...
3
votes
1
answer
1k
views
Chroot, Containers or Virtualization on OS X for safe development
I would like to provide a bit of context before asking my questions:
I've been working on Windows/Linux for years, and recently I was having a good time with WSL2.
My Windows machine isn't powerful, ...
3
votes
2
answers
5k
views
sudo kill -9 pid doesn't kill softwareupdated in mac
I have a process softwareupdated which is consuming lot of data. I just want to close the process as I dont want to update .
I tried sudo kill -9 pid but it doesn't kill softwareupdated in mac.
I keep ...
0
votes
0
answers
164
views
Including chmod in shell script - will it work for everyone?
I have a large wrapper.sh file which does a lot of things, but in the end runs catalina.sh tomcat.
Problem is that users who run this wrapper.sh are experiencing error: no permissions to execute ...
1
vote
1
answer
394
views
How to fix broken "newline" from Mac to Windows
I have been given a set of python codes (.py) which were written on Mac. Unfortunately, when I open them on windows (pycharm, notepad, even word), there are no line breaks. I asked for .txt versions ...
0
votes
0
answers
400
views
MacOs: "rtf can't be opened" when converting rtf to txt using terminal
I hope to convert some rtf files into txt files. However, when I tried
textutil -convert txt PathName/*.rtf
I got
Error reading PathName/FileName.rtf. The file “FileName.rtf” couldn’t be opened.
I ...
0
votes
1
answer
125
views
macOS|Unix combine multi-line .txt file into single line with no spaces? (no line breaks)
I've been looking around & I cannot seem to find a command or regex that will do a simple command of combing all linebreaks & spaces in a text file into one line. most of them either add some ...
0
votes
1
answer
2k
views
lsof is not working for me on Mac OS X 10.13 - gives error, I'm trying to find process accessing a specific IP address
lsof isn't working for me. I'm trying to use instructions in posts such as How do I find out which program and process ID accesses a given IP address in macOS? to find which process is accessing a ...
0
votes
0
answers
208
views
Terminal color codes not working as expected
I am using the following code in my ~/.bash_profile following some online blogs.
export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced
export TERM="xterm-color"
export PS1='\[\033[1;32m\]$...
0
votes
1
answer
208
views
How does Iconv handle endianness?
echo hello | iconv -f ascii -t utf-16le | od -x
produces what seems to me like a big-endian result
0068 0065 006c 006c 006f 000a
whereas the same line without the le produces, on a ...
0
votes
1
answer
263
views
Command 'date +%W' does not return week 00
Manual page for date(1) says:
%W week number of year, with Monday as first day of week (00..53)
I assumed there exists a week number 00, and I handle such week in my program, but once I decided to ...
2
votes
0
answers
398
views
accesstime on macOS Catalina 10.15
Suppose you own a file system on a unix machine, and
you would like to know which of the regular files on this system
you have accessed within some interval.
("Regular file" means it is not ...
0
votes
1
answer
6k
views
SSH config explanation: Could not resolve hostname: nodename nor servname provided, or not known
I recently came across this ssh config file in one of my projects:
~/.ssh/config
Host git-codecommit.*.amazonaws.com
User my-aws-user
IdentityFile ~/.ssh/id_rsa
Include config.d/*
~/.ssh/...
1
vote
1
answer
525
views
ACLs on macOS: ACE "deny delete" on macOS with APFS broken? File not writable in GUI
Since the UF_NOUNLINK Unix flag is actively being thwarted by macOS, I was thinking about using a self-made shell script to achieve a similar functionality with an ACL, namely to prevent accidental ...
0
votes
1
answer
2k
views
How to close a Terminal window using bash and AppleScript without using SystemEvents?
Background
I am trying to create a script that when executed, opens a new Terminal.app window executes the desired commands and closes the window when complete.
One solution was to use SystemEvents ...
1
vote
1
answer
3k
views
How to fix “Operation not supported” on mac os
I am trying to install the Flutter onto my computer onto an external drive I have followed the instructions on their website to try and install it. https://flutter.dev/docs/get-started/install/macos. ...
2
votes
1
answer
1k
views
open a random file in osx with command line
I'd like to open a randomly selected file via the terminal.
I found shuf, which seems to be just the utility that I need, although I cannot figure out a way to make the command I'm working with ...
0
votes
1
answer
1k
views
How to use Traceroute --mtu on Mac
I am trying to do the following
Traceroute --mtu google.com
however I get a usage: traceroute [-M first_ttl] etc giving me all the command lines. How can I use --mtu with traceroute on mac?
I am ...
17
votes
2
answers
150k
views
"Read-only file system" when I try to touch in Mac OS Catalina
I'm logged in as admin in MacOS Catalina. When I try to add quota file, I get this output:
sudo touch /.quota.ops.user
> touch: /.quota.ops.user: Read-only file system
Than I tried:
mount -uw /
...
0
votes
1
answer
230
views
Replace files recursively
I have a deeply nested directory called MyProject which contains dozens of git repositories. Each of those repositories contains, somewhere, a directory called utils which contains a file called ...
0
votes
1
answer
129
views
Have utilities like vim and less source .bash_login or .bashrc for command lines
When I try to enter an alias into the less or vim command lines, they both print “/bin/bash: [MY ALIAS]: command not found”
This alias is defined in .bashrc or .bash_login and is there a way to ...
1
vote
1
answer
216
views
How to make command line tool “ctpu” be recognized by my terminal?
I downloaded the ctpu command-line tool made by Google. This tool makes it easy to set up and run Cloud TPUs for deep learning projects. I successfully downloaded the tool to my ~ directory (Users/...
0
votes
1
answer
221
views
I don't see my mounted DVD being listed when I use the ls command to list all that's on my Desktop
I don't know if I did something wrong, but I was able to see the mounted DVD label name in Terminal when I did the ls command earlier while in my Desktop directory, now I can't, even though the DVD is ...
3
votes
2
answers
8k
views
How to delete a directory in MacOS from the command line?
I would like to know how to delete a directory on my MacBook. I have tried several methods such as moving it to the Trash -> Empty Trash, via the command sudo rm -rf, restarting the computer in ...
0
votes
1
answer
5k
views
Installation of PuTTY on Mac-Mojave
I downloaded PuTTY as given in this https://www.puttygen.com/download-putty .
And I got a Unix executable file and as soon as I click on it I am getting an error:
(process:5149): Gtk-WARNING **: 21:...
0
votes
1
answer
6k
views
Trying to install psutil results in error
So with the following commands:
pip install psutil
pip3 install psutil
sudo pip install psutil
python -m pip install psutil
python3 -m pip install psutil
sudo python -m pip install psutil
sudo ...
2
votes
0
answers
682
views
MacOS 'at' command not working; com.apple.atrun.plist missing?
I have been having trouble running the 'at' command as in this question https://stackoverflow.com/questions/56548065/wanting-to-run-a-script-at-a-certain-time-on-macos-instead-returns-job-4-at-we
I ...
3
votes
1
answer
20k
views
How does "echo $0" work?
I found out on Ask Ubuntu I can use this command to figure out what shell I am in.
echo $0
I like this because it is simple as compared to more complex solutions like this one on the Unix and Linux ...
0
votes
2
answers
99
views
Unusual prompt in the terminal
I have a really unusual prompt in my Unix terminal (I'm using macOS). It looks like this:
myUserName@Galaxy-A7-2016
I've never seen the @Galaxy-A7-2016 bit before and I'm worried someone might have ...
1
vote
0
answers
268
views
Problems installing RCPLEX
I get an error while I try to install RCPLEX on my Computer and I can't figure out what to do. There is no information what so ever on the internet regarding my problem.
R Marcel$ R CMD INSTALL --...
1
vote
2
answers
2k
views
Tail -f last modified file in folder
I'm trying to use tail -f to follow a log in file in a specified folder. I can do this with the simple command tail -f [path to file] but is there a way i can have a command that runs and tracks the ...
0
votes
1
answer
84
views
MacOS Where can I find what was in /usr/etc?
I recently was trying to reinstall all of the Homebrew libraries and accidentally deleted /usr/etc instead of /usr/local/etc using rm -rf. When trying to reinstall torch-rnn, I got this error:
...
1
vote
1
answer
247
views
Accidental Unix Mac Terminal Commands
I accidentally used the following commands in terminal:
In recovery mode: nvram boots-args="x"
In a user profile in terminal:
(a) sudo nvram boots-agr="" and
(b) sudo nvram boots-args="",
and then ...
0
votes
1
answer
89
views
Getting the same email almost every time I open macOS Terminal
Almost every time I open Terminal on macOS I find new mail sent somewhat (10 identical emails, or sometimes more). I believe something I did or installed caused this, but I couldn't figure out what is ...
1
vote
1
answer
126
views
Is there any way to check the SSD of a MacOS in binary / hexadecimal?
Macs are based on UNIX as far as I know. Thereby I was wondering if there was any way of checking the entire content of the SSD of a macOS in binary or in hexadecimal.
EDIT: I know about xxd and such ...
2
votes
0
answers
255
views
How can I set a unix binary as a default application in Mac OS High Sierra?
I want to configure mupdf to be my default PDF viewer in Mac OS, but it's a unix console executable located in /usr/local. The traditional "Open with" method does not work, as Finder will not allow ...
1
vote
1
answer
60
views
Why are files lwith the same time stamp not sorted alphabetically when listed using "ls -lt"?
I read that ls -lt will order files by modification time before sorting by lexicographical order.
However, when I use the command with this syntax, I get this result:
ls -lt
total 192
-rw-r--r-- 1 ...