Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [command-line]

Using programs and commands that do not have a graphical user interface (GUI) but are rather controlled by typing text commands into a terminal program, or shell.

0
votes
0answers
21 views

'tmutil listbackups' doesn't work in Mojave - tmutil could not access private application data on the backup disk

I‘ve tried to apply the solution described in https://apple.stackexchange.com/a/281617/9058 on macOS Mojave, but it doesn‘t seem to work any longer: root@nomi ~> tmutil listbackups The operation ...
2
votes
1answer
25 views

applicationDidFinishLaunching - anyway to get this using script/command?

Is there a way to detect when an app has finished launching after using open <path_to_app> in a shell? The prompt after issuing the command is immediate, but for apps that take a while to fully ...
3
votes
2answers
118 views

Anyway to obtain list of Application that can open a file via Terminal?

In the finder you can control click on a document to get the contextual menu, this has 'open with..' with a submenu of all apps that can open that document. Is there a way to get this list via ...
1
vote
1answer
12 views

What's the fish shell equivalent to `set -o vi` to get vi/vim key bindings to access command history and edit?

I'm one of the "cursed ones" that got their start in vi instead of emacs so the shell editing commands I am used to are set in bash with set -o vi but this doesn't work in the fish shell. How can I ...
0
votes
2answers
38 views

How can I query the hardware UUID of a Mac programmatically from a command line?

The hardware universally unique identifier (UUID) can often be used by developers to associate information unique to a Mac. This identifier will usually persist through OS upgrades or reinstalls, as ...
1
vote
0answers
30 views

“Full Disk Access” for backup tool running as cron job [duplicate]

I'm running a command-line backup tool (duplicity) as a cron job. But in Mojave, there is a new user data protection feature called "Full Disk Access" (part of the TCC access control framework) that ...
2
votes
0answers
27 views

Query Spotlight indexing status from Terminal

Is there a way to get the indexing status of Spotlight using Terminal commands? I know that I can just press command+space and type anything to get a progress bar, but I would like to be able to get ...
0
votes
0answers
21 views

I keep getting the error zip warning: zip file empty when using zip from command line

command i am running is zip -r /Users/NONAME/Documents/lumosign/ipastosign/Payload . -i /Users/NONAME/Documents/lumosign/ipastosign/spotify2.zip; And the zip file is ACTUALLY empty. This is getting ...
3
votes
1answer
708 views

Mac OS Mojave 10.14.1 Trying to Install Old Command Line Tools

I've just installed Mac OS Mojave 10.14.1 and the latest XCode. ➜ ~ sw_vers ProductName: Mac OS X ProductVersion: 10.14.1 BuildVersion: 18B75 I was just running updates and noticed one of ...
0
votes
1answer
34 views

How to specify a startup folder in the open command to launch MacVim?

If I want to open a file in MacVim from the terminal. I use the following the command open -a MacVim --args filepath. It disregards my working dir so I need to always specify the full path when ...
4
votes
0answers
196 views

When installing command line tools using Terminal, I am getting “Software currently unavailable from Software Update server” error

I have downloaded Xcode on my Mac running macOS Mojave and trying to install the command line tools using the following command: xcode-select --install But it is giving me the following error: Why ...
-1
votes
1answer
31 views

How to skip 'Cancel' 'Continue' when running shell script with automator?

I'm trying to run pmset sleepnow linked to a keyboard shortcut with automator. When I use the shortcut, it's giving me a 'Cancel' or 'Continue' prompt. Anyway to skip this so the script just runs when ...
3
votes
1answer
223 views

Can a Mac's part number be determined with a Terminal Command?

I need to determine the Apple Part Number 'MXXXXXLL/A' and do not have the original packaging. Is there a way to do this from command line? I don't need model #, I specifically need the part #. ...
1
vote
0answers
13 views

How to “switch my Python” to pip update the package copy that my IDLE accesses?

I have an Anaconda installation of Python as well as an installation that comes when downloading Python and IDLE from Python.org and I use both of them. For my Anaconda python I can use pip install --...
2
votes
0answers
22 views

Apple Remove Dock Icon with a command line

I'm trying to find the terminal command which can remove an icon from the dock, but I can't find the solution. I tried the defaults read / defaults write command but it doesn't seem to have the ...
1
vote
0answers
22 views

Is it possible to use Python while in Recovery Mode?

Is it possible to access a Python terminal while in Recovery Mode? $ /Volumes/macOS/usr/bin/python python: posix_spawn: /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python....
0
votes
1answer
19 views

Geektools Shell Problem

In order to monitor the filesystem activity on my computer, I found command "sudo fs_usage", which works very well in Terminal. Then I had the idea to display those system activities (written) on my ...
0
votes
0answers
11 views

Shell Desktop Geektools command fs_usage

In order to monitor the activity on my MacBook - I would like to display activity (written) on my desktop. I suggest to use Shell with command: echo + | sudo -S fs_usage But it doesn't work :(
1
vote
0answers
24 views

How to enable/disable Do Not Disturb from shell on Mojave?

I've searched far and wide, but obviously not enough, to find a solution for this on macOS Mojave. I found the answers here, but they don't work on Mojave: https://apple.stackexchange.com/a/303400/...
1
vote
1answer
16 views

Create an hardlink across storage device (or alternative solutions)

I have named my secondary SSD with a name with a space in it - "My SSD", and have been using it for many years with multimedia applications without any problem. Part of my media library with thousands ...
1
vote
0answers
44 views

How to open multiple iTerm2 tab with admin privilege

So I have an executable program in my /usr/local/bin/ called myApp. I need to run multiple myApp processes in new iTerm2 tabs with sudo. The file structure is like this: --myFolder ----v1 ----v2 ---...
3
votes
0answers
58 views

Renew free provisioning profile from CLI

I'm developing an iOS app to run only on my phone (a.k.a. sideloading), and I don't need to distribute it. With a free iOS dev account, my provisioning profile expires every 7 days. I'm looking for ...
1
vote
0answers
15 views

Change Text to Speech Speed on the command line

I want to change the speed of my text to speech. I know I can do this via preferences like this: However, I want to configure this setting via the command line. How can I set the speaking rate via ...
3
votes
1answer
133 views

Terminal command to remove custom icon from file (HFS+)

Context In Mac OS X / macOS you can select a file in the Finder, click Informations then click the icon, and paste any image/icon that is in the clipboard. Now this file has a custom icon made of ...
3
votes
1answer
44 views

How can I run “say --output-file” without it hanging (and worse) with more than 310 bytes of input?

For my non-commercial curiosity, I'm interested in turning some of Lewis Carroll's work into machine-generated speech. When sending the output to an audio device, the say command can do this even with ...
3
votes
2answers
492 views

Why is /usr/include missing? I have Xcode and Command Line Tools installed (Mojave)

I just upgraded to Mojave from High Sierra and installed Xcode plus its command line tools and additional tools. Nothing will compile from the terminal, everything says /usr/include is missing! I ...
0
votes
2answers
123 views

I need Git. Is it better to install command line tools (183mb) or `brew install git`?

I think that it is better to install Git from Homebrew: Less size Install only what I need - I do not need LLVM compiler, for example. Faster install All packages in one place No need to re-install ...
0
votes
0answers
59 views

How to Activate 'remote management' without observe using terminal

I was wondering if it was possible to activate the remote management via the command line but without activating the OBSERVE option. (I don't want to do it with the GUI since I will push this ...
8
votes
1answer
2k views

Is there a script I can use to download the Mojave installer without being signed in to the App Store?

Is there a way to script and download the Mojave installer without signing in to the App Store? Something other than opening or clicking a url that points to the installer on the Mac App Store would ...
11
votes
1answer
1k views

Homebrew and Git - Wrong language on the command line

I have a strange issue - when I use the git command which comes with the Command Line Tools package, the interface on the command-line is in English, as I want it to be. However, the version installed ...
0
votes
3answers
89 views

Running `nano` uses the old nano(2.0.6) even though nano 3.0 is installed

I installed nano 3.0 with brew install nano, but when I run nano --version, it shows version 2.0.6, which is what came with macOS. Screenshot: echo $PATH also shows that /usr/local/bin is listed ...
3
votes
2answers
140 views

Copy the first n files from one directory to another

Im looking to copy the first 'n' files from one directory to another directory preferably with only cli tools (no scripts). I've tried the following: find . -maxdepth 1 -type f | head -5 | ...
2
votes
1answer
67 views

Any way to open a URL in a script without having it open in a browser

The situation: My mobile carrier offers for free to send SMS notifications by following a URL. What I'd want: Include these URLs in various scripts to get notifications when I'm away from keyboard. ...
3
votes
2answers
84 views

Difference between filename and . filename in macOS terminal

I'm newbie to MacOS. (I'm using mac OS high sierra 10.13.6) I installed a software. They said to initialize the software by . /path/setsas.sh I give no thought to . and space, so I just ran path/...
3
votes
1answer
239 views

Command line to find bluetooth device's MAC address [duplicate]

Is there a way to get the MAC address of the Bluetooth device in my Mac? I am using a MacBook Pro running macOS High Sierra. I am looking mainly for macOS but the command could also be for another ...
2
votes
1answer
41 views

Save command line output to a file without any graphics or special characters

I want to save the command line output data in a text file. I am running macOS High Sierra 10.13.6. The problem is, it has some graphical output which I don't want to store. What I need is, only the ...
4
votes
2answers
71 views

Bash - Suppressing output to STDOUT

I've written a script for fresh macOS installs that installs Homebrew, Cask, and a bunch of apps I like, along with creating a .vimrc file. Thanks to an answer by daniel Azuelos (located here: Best ...
0
votes
0answers
42 views

Looking for an ios terminal/ssh app that supports jump hosts and agent forwarding

I stumbled upon Termius. They support agent forwarding. But support for jump hosts (or "host chaining" as they call it) only exists in the android version of the app. Is there an alternative to ...
0
votes
0answers
33 views

preventing a file from being changed or emailed

I have a file/programm on my computer which I woud like to remain offline. More specifically, I'd like to block myself from emailing it to myself, and then opening it on another computer. But I'd ...
0
votes
1answer
52 views

After installing wine with a .pkg, I get the error wine: command not found when running from the terminal but the app works fine

I have installed wine through a .pkg from here. Wine Stable.app works fine, but when I run any wine-related command from the terminal, I get command not found.
0
votes
0answers
59 views

Post-install step not completing while installing wine with homebrew

I'm trying to install wine with brew install wine, but it keeps on showing Warning: The post-install step did not complete successfully and when I try again with brew postinstall wine, it shows the ...
3
votes
1answer
137 views

How do you insert literal control chars in vim on Mac?

How do you insert literal control characters in vi on Mac? For example what is the Mac equivalent of Unix ^V^M Windows ^Q^M (in vim) to insert a \r into a substitution string?
3
votes
3answers
52 views

Make Time Machine use two drives from Terminal

My desire is to have two identical Time Machine backups on two different locally attached drives. My first thought was a clone via Carbon Copy Cloner, but it won't do it, because Apple won't let third ...
0
votes
1answer
33 views

How to get the Disk Image property using terminal?

Let's say I have the volume path. Normally I can right-click and 'Get info' to get its Disk image. I want to replicate the same on terminal (basically need to code it in objective C) mdls doesn't seem ...
0
votes
1answer
42 views

How to script a global keyboard shortcut in MacOS

I want to configure a global keyboard shortcut in MacOS using a script. Specifically, I want to set the "Move focus to next window" to ⌘⇧§ (since I have a Swedish keyboard and the default ⌘⇧` has a ...
0
votes
1answer
23 views

Why isn't xargs running one command per line for this use case?

My overall task is to ping each EC2 server I happen to be connected to. I am using this command to do that: netstat -W | grep ec2 | cut -d " " -f 18 | sort -u | cut -d "." -f 1,2,3,4 | xargs -0 -p "...
-2
votes
1answer
60 views

Hacking via Terminal Shell Script [closed]

Is there a shell script that you can use to hack cell phones with just their number from your macOS? I ask because my phone was hacked with just the number and I am curious how it was done? This may ...
6
votes
4answers
2k views

Is it normal to have same user logged in twice but from another TTY?

I don't know if this is something that is in macOS, but in Linux I normally see only one user if I run the who and w command. Is it normal to have same user logged in twice but from another TTY? I ...
3
votes
2answers
40 views

Trigger the Creation of a Specific Preference List?

I have the following function: hardware_model () { local hardware_mod hardware_mod=$(defaults read ~/Library/Preferences/com.apple.SystemProfiler.plist 'CPU Names' \ | cut -sd '"' -f 4 \ | ...
1
vote
2answers
60 views

Set pmset to sleep in a specified time

I could set sleep as pmset sleep now I'd like the machine to sleep in 10 minutes later for example, (I am going to have lunch but desire Mac wait a process to be finished) I checked the "pmset" and ...