All Questions
Tagged with command-line mac
183
questions
0
votes
0
answers
14
views
Run a command, immediately return to the shell prompt, do not return a message when the command is finished [duplicate]
brew install gh > /dev/null 2>&1 &
This returns to the shell immediately, but prints [1] + done brew install gh > /dev/null 2>&1 when the command finishes.
brew install ...
0
votes
0
answers
120
views
MacOs equivalent of adding a user to the linux dialout group on for permissions setup for UART communication
I'm working on a project where I'm interfacing with some hardware and want to monitor the data from some sensors using a specific tool. The tool doesn't have official support for MacOS but I've ...
0
votes
1
answer
37
views
Extract filepaths of .MP4 files in subfolders of main folder to textfile
I am on Mac. I want to use terminal or something to extract the filepaths of the .MP4 files within a folder with multiple levels of subfolders. I have a main folder that has subfolders. Each subfolder ...
1
vote
1
answer
1k
views
Set macOS screensaver from command line in macOS 14 Sonoma
In earlier versions of macOS, I was able to set the screensaver from a shell script using a command like this:
defaults -currentHost write com.apple.screensaver moduleDict -dict moduleName Drift path /...
2
votes
1
answer
109
views
Change argument to -y, --yes, --assume-yes
Can anyone help me alter this script to automatically YES? y?
I don't need to or want to confirm yes, I just want to pass yes into the shell shortcut.
cat << "EOF" >> ~/.zshrc
...
3
votes
1
answer
3k
views
GPG stops doing anything on Mac
Twice now GPG has completely stopped working for me after some time (days or weeks) of not using it. When trying to use it, no errors show up and it simply sits and does nothing until i use ctrl-c to ...
0
votes
0
answers
84
views
Force connection to a server through 10G interface adapter, en4 instead of en0, on macOS
I have two macs (iMac and Mac mini server with attached RAID storage) that both use a 1GB LAN 192.168.10.x/255.255.255.0 for internet connection using the built in ethernet ports. They are attached to ...
0
votes
0
answers
147
views
How to make shorten mac terminal prompt in bold using powerlevel10k?
I'm using oh-my-zsh, powerlevel10k, colorls and fig to customize my mac terminal. Now i have just one issue that i want the current directory name in bold.
And one more problem that i want to change ...
2
votes
1
answer
5k
views
Is openssl is an alias for libressl on macOS?
I have no idea why despite having (seemingly) openssl, when I run:
openssl version
it outputs:
LibreSSL 3.3.6
And when I run which openssl and type openssl to check whether or not openssl is just an ...
0
votes
0
answers
333
views
Alias not exported from .zprofile to folder location that exists
In my .zprofile, I have a bunch of aliases that follow the same pattern:
export remotedir="$HOME/remote"
export localdir="$HOME/local"
etc.
They all work, except for one, which ...
0
votes
2
answers
218
views
Why is my Mac Terminal using Chinese double quotes?
I am trying to type cd ~/ in my terminal, and I got
cd: no such file or directory: “/Users/xiwei”/
For some reason, it's using the Chinese Quote “” instead of the standard "".
If I type cd ...
0
votes
0
answers
497
views
How Can I Delete Files with Extended Attributes
My system has a bunch of files on an attached WD Mac Passport drive that I think were created by a file synchronization application that I no longer use. I would like to delete these files. All of ...
0
votes
2
answers
2k
views
DD image with no empty space of the volume
I want to create a DD image of a Volume of OSX from mac with none of the empty space, only the used space with data on it , to reduce the size of he img/dmg/raw file.
I've tries multiple software but ...
1
vote
1
answer
119
views
Changing default Dropbox at command line to a business account from a personal account on macOS
I've linked to my business Dropbox on my Mac which already had my personal Dropbox installed. I can easily access both my Dropbox (Personal) and Dropbox (Business-name) from the Finder.
At the command ...
2
votes
0
answers
143
views
How do I diagnose a slow Mac from command line? (OS X El Capitain)
I have a very old (I think circa 2009) Mac Mini, which effectively just acts as a NAS for our TimeMachine backups these days. It was working fine until about 2 days ago, when all of a sudden those ...
1
vote
1
answer
2k
views
How to Access MS Team Files from Command Line
Context: I would like to create folders and files for an existing MS Team from the command line as opposed to the GUI. I only have a beginner level understanding of the MS architecture.
Question: From ...
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\]$...
1
vote
1
answer
411
views
bash: command not found error
I'm new to terminal, and am just following a beginners python course, I've saved an "example.py" file and im trying to open it but get this error?
also where it says "pc-79-59" that used to say the ...
1
vote
1
answer
771
views
Can't login to terminal i get the following ......... login: login: could not determine audit condition (process completed)
I was upgrading my HDD to SSD on my mid 2011 iMac 21.5 in 2.5 GHz intel
core i5 running High Sierra 10.13.6 used superdooper to clone the original HDD to SSD then made another superdooper clone to a ...
0
votes
0
answers
365
views
(Mac terminal) command line advice for extracting thousands of archives
I have literally thousands of archives containing Amiga adf files that I've downloaded and want to unpack them all.
Can someone please tell me the command line i need to use in terminal in order to ...
1
vote
1
answer
967
views
Replace a line containing special characters in all files recursively using SED MAC
I was trying to replace a line with another using SED on MAC OS X Terminal
I have a scenario where I need to replace a line in all files present in a directory with another line.
Both lines are ...
0
votes
0
answers
190
views
Modern Mac mini does not autoboot after "dirty" shutdown from command line
Cross-posted to Ask Different
This 2018 Mac mini running Mojave is intended to run as a kiosk, but a daily sleep/wake cycle is proving problematic with some USB devices.
My plan was to use the "...
0
votes
0
answers
1k
views
Terminal command like Xcopy on mac
Before anyone says rsync, is it possible to use a terminal script (or command line entry) to copy updated files only from one place to another on a Mac ie.
xcopy "D:\projects" "E:\projects" /d /y /s
0
votes
0
answers
114
views
Not able to complete AWS CLI on my mac
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/docutils'
Consider using the --user option or check the permissions.
I ...
0
votes
2
answers
2k
views
Install Beautiful Soup for Use with a Higher Version of Python (than default Mac OS)
I have just reinstalled python 2.7 onto my macbook pro (running OS 10.13.6 High Sierra) as I had inadvertently removed it, not realising that it was required. I also have Python 3.6.8 loaded on the ...
2
votes
1
answer
4k
views
How to give Full Disk Acces to the Terminal App from Command Line? Mojave 10.14
I want to do the following from the command line:
Terminal Full Disk Access
Is it possible to give the terminal app full disk access from the command line?
I am getting "Operation not permitted" ...
5
votes
1
answer
927
views
Find matching between two text files in Terminal
I have a big .txt file with 1,755,972 lines (one value/line). I have another .txt file that has 1,400 line (one value/line). I want to see the matching between the two regardless of the order between ...
0
votes
1
answer
144
views
command line to put values separated by comma in separate lines
I have a very big .txt file with 1748251 lines. Most lines have one value. Some lines have 2 or more values separated by comma.
What command help separate those values into different lines?
ie. input....
19
votes
2
answers
5k
views
Why is a directory copied with the cp command smaller than the original?
I am tying to copy one directory with a large number of files to another destination. I did:
cp -r src_dir another_destination/
Then I wanted to confirm that the size of the destination directory is ...
0
votes
2
answers
42
views
Booting up my iMac
I can’t boot up my iMac, can’t even go into single user mode. If I boot up to recovery mode( command r upon power button) it will load online but till loading bar is finish downloading, it will go ...
1
vote
1
answer
638
views
How can I share only my CMD Prompt window remotely to other computers?
I have recently been setting a server and when I start it with its files in the folder with a .bat file it opens up terminal with a command line for it. It is very similar interface to what a regular ...
13
votes
2
answers
4k
views
Use of / when using cd
I'm in my home directory on my mac:
$ pwd
/Users/lukas
When I cd around, I do not (and can't) start the path with /:
$ cd Documents/
/Users/lukas/Documents
$ cd /Documents
-bash: cd: /Documents: ...
0
votes
1
answer
266
views
`grep` to find words with several criteria (for scrabble)
I'm using a scrabble words list I downloaded named "sowpods.txt" and I am trying to use grep to find all of words with these criteria:
7 letter word
Starts and ends with the same letter
Has the same ...
0
votes
1
answer
226
views
Why can't I see a separate curl file along with all the libcurl files after building it from source?
I downloaded the source file from https://curl.haxx.se/download/ (curl-7.59.0.tar.bz2) to build the curl command line tool, or so I thought. I followed the instructions on curl's site (./configure, ...
3
votes
1
answer
962
views
Sort with case-sensitivity in macOS in the Terminal
I am trying to use the answer in GNU Sort by case-sensitive to sort a file in my Mac OS.
My file.txt looks like this:
"Best"
"A"
"BEST"
In the second answer to the mentioned question, it says that ...
1
vote
0
answers
6k
views
ls command not working in the home directory
The ls command works fine for me in all other directories except my home directory, where I get the following error:
* Exit with code 1, no result found, command line was:?? locate -b -i [\^g]*g[\^a]*...
7
votes
2
answers
6k
views
How to clear (remove) macos extended attributes recursively from a directory?
I downloaded and extracted an archive from GitHub (Homebrew/brew) into a temporary directory under /root (with help from sudo). If I do ls -l I see an extended attribute:
total 0
drwxr-xr-x@ 16 root ...
1
vote
1
answer
1k
views
Installing s3cmd on MacOS High Sierra with pip
I have installed s3cmd with pip on MacOS High Sierra, which has successfully installed.
sudo pip install --user s3cmd
The directory '/Users/crmpicco/Library/Caches/pip/http' or its parent directory ...
-2
votes
1
answer
380
views
Network information from macOS command line
What is the command in mac os X to get:
The TCP ports numbers on which my computer is listening, ignoring when its listening to itself (127.0.0.1)
My routing table.
0
votes
1
answer
5k
views
How to update Mac iTerm2 terminal prompt
I am using Mac 10.13.2 High Sierra. I made the following .bash_profile file to see the file path along with the prompt and if it has any Git repository it shows the Git status as well.
All is working ...
1
vote
0
answers
85
views
Mac OS terminal command
I am using Mac OS 10.13.2 terminal to create a 'tar' copy of a folder and would like to know as to how I can preserve the owner and group when creating the backup. Also, when extracting the folder ...
0
votes
1
answer
504
views
Flex gives no output on MacOS High Sierra / Xcode 9
I upgraded to MacOS High Sierra and Xcode 9, and now when I run flex (lex / lexical analyzer), it gives no output.
Why, and how can I fix it?
eg, flex -t testfile.lex gives no output (for any valid ...
0
votes
1
answer
529
views
Take a partial screenshot with command line in other screen
This seems like a really easy fix but I have the following problem:
I want to take a partial screen using the command line
Therefore I do this
screencapture -w -R8,104,1460,620 ~/Desktop/test4.png
...
1
vote
0
answers
1k
views
See output command terminal history in zsh terminal
I'm in an edge situation and I really need to retrieve some generate random value I executed last week in iTerm through the command: cat /dev/urandom |LC_ALL=C tr -dc 'A-Z9' | fold -w 81 | head -n 1
...
1
vote
3
answers
958
views
How to install 'glogg' on a Mac?
I just tried to install Glogg on a Mac, which kind of worked, but this tool does not seem to be available on the command line. When I try to start it on the comment line it says:
mypc:Space me$ ...
0
votes
1
answer
36
views
i am unable to make multiple directories at a time in my mac terminal
i am unable to make multiple directories at a time in my mac terminal i.e. i wrote in command : "mkdir temp/thing/stuff/random" and it showed the result : " No such file or directory" so my question ...
5
votes
2
answers
2k
views
What command counts the number of an specific type of file (eg: csv) in a directory on OS X?
What is the command line to count the number of an specific type of file (eg: csv) of a directory on OS X (only files, excluding directories and subdirectories)?
The below command works for any kind, ...
2
votes
2
answers
2k
views
non-interactive ssh session not finding command even though it is in the PATH
I am trying to run a command via ssh on a server running mac os 10.9.5 with a command like
ssh server.address command
and am getting the error bash: command: command not found.
When I log in with ...
8
votes
2
answers
13k
views
Mac "command" to change the background color in a terminal
I want to change the background color of my terminal. setterm doesn't work on a mac? I did find a command which changes the prompt to include the ANSI code?
PS1="\h \w$ \e[0;32m"
But it doesn't ...
0
votes
3
answers
94
views
How do I determine what file calls a bash command at login?
I'm a computer science student on Mac OSX El Capitan. My friend made it so that my computer runs say 'heil hitler' whenever I login to a new instance of Terminal. Needless to say, I need to get rid of ...