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.

learn more… | top users | synonyms (2)

-1
votes
2answers
54 views

Terminal won't find any file/directory with the suffix “~/.” or “~/”

my terminal isn't capable of finding any file or directory if I type in the name of the file or directory which start with "~/." or "~/". I have OS El Capitan, XCode 8 is installed, so is XCode ...
1
vote
4answers
98 views

How to find the running TFTP Server process name?

I can use command sudo launchctl load -F /System/Library/LaunchDaemons/tftp.plist to start TFTP Server on mac. But what is the process name of the running TFTP server? I tried ps aux | grep tftp and ...
0
votes
0answers
27 views

Is there a “findmnt” equivalent for OS X?

I find findmnt's output much easier for a quick scan of the filesystem status than the traditional mount command. Is there an equivalent for it on Mac? It's part of util-linux package. HomeBrew doesn'...
173
votes
8answers
93k views

How can I trigger a Notification Center notification from an AppleScript or shell script?

I'd love to be able to take advantage of 10.8's Notification Center features in AppleScripts and shell scripts I write. Is there a built-in command or a third-party library I can use from either an ...
0
votes
0answers
11 views

How to show a large notification banner on OSX screen?

Is there a tool to programmatically, from command line, show a large notification banner on top of other windows, on all screens, or at least on the currently active screen? I mean obnoxiously large, ...
0
votes
2answers
86 views

batch rename pdf files by content

I have a big pile of pdf's and I would like to batch rename them by content. (They are all searchable). And I'd like to do so using command line interface. They are all payslips so they have a ...
0
votes
0answers
17 views

How do I fix this AppleScript error?

I have the following AppleScript: do shell script "/System/Library/CoreServices/Menu\\ Extras/user.menu/Contents/Resources/CGSession -suspend" Whenever I run it, I get the following error: ...
9
votes
3answers
19k views

how to reinstall xcode command-line tools?

I had serious problems from two versions of Xcode on the same machine. I removed all Xcode app instances & many other non-System 'xcode'-related files, then reinstalled the app (4.6.2), fixing my ...
0
votes
2answers
56 views

How can I silence the startup chime on El Capitan?

It's insane that in 2016 we still have to do with this, but since upgrading to El Capitan, previous solutions don't seem to work for me anymore. This is what I've tried. silence.sh sudo nvram ...
7
votes
1answer
216 views

Why does OS X have bash v3.2.57?

OS X comes with bash version 3.2.57 instead of bash version 4.3.39, which GNU lists as the current stable release of bash. Is there any way to upgrade bash on Mac OS X?
1
vote
1answer
22 views

Change “from” address in Terminal `mail`

When sending mail from shell, e.g., echo '123' | mail -s 'subject' name@mail.com The recipient gets an email from "my-local-username@my-machine-name.local", e.g., "bob@macbook.local" How can I ...
0
votes
1answer
68 views

How to update xcode from 7.2.1 to 7.3.1 using terminal (commandline tools)

I just need to know if there's a way to update xcode from 7.2.1 to 7.3.1 using terminal (commandline interface)? The reason is I updated the xcode via mac appstore and once it was installed, the ...
0
votes
2answers
46 views

command line update of python3

I have both python 2.7 and 3.5.1 installed in my Mac (El Capitan). I left version 2.7 as per this recommendation. Now I would like to update version 3.5.1 to the latest one but from the command line. ...
0
votes
1answer
23 views

zless exits when reaching EOF

I run the command zless some.log in OS X 10.11.5 El Capitan. It closes when reaching EOF. I checked aliases and I do not have LESS env variable set up but still it looks like zless runs with -Q ...
1
vote
0answers
15 views

Communicate with Siri via text (command line) not speaking

I use macOS Sierra beta. It's the first time I play with Siri. I enabled always iOS and macOS privacy/security options, nevertheless Siri knows very much about me. Is it possible to input text for ...
0
votes
0answers
29 views

Go2shell don't work with zsh

I recently switched to zsh from bash, and Go2Shell don't work with zsh. When I click the Go2Shell icon from Finder, the iTerm window opened but the directory is the last dir in iTerm instead of the ...
0
votes
0answers
26 views

Mount USB drive in single-user mode without writing to root file system?

I'm trying to recover files from a MacBook with a failing hard drive. It can't boot normally, it can't boot to recovery, it can't do target disk mode. It CAN boot to single-user mode, and I can read ...
1
vote
4answers
578 views

Shell command to count pages in a PDF (other than pdftk)?

I have been using this to get a page count of PDFs in shell scripts in OS X: pdftk "$i" dump_data | grep NumberOfPages | awk '{print $2}' | tr -dc '[0-9]' (where $i is the PDF filename) However, ...
25
votes
4answers
7k views

Can Mac App Store installs & upgrades be automated?

How can I script installing or upgrading apps from the Mac App Store? I'd prefer command line tools, but AppleScript or some other API would suffice. Relevant puzzle pieces: installer: note ...
1
vote
0answers
14 views

How to remove meta data from PDFs?

Since PDFs contain a lot of meta data like my name and the application name which created the file, I was looking for a utility that would allow me to remove all meta data from the PDF file. Ideally, ...
2
votes
1answer
163 views

How do I override the terminal command “rm” to perform the “rm -i” command by default?

The command rm nukes files. rm -i asks for confirmation before nuking the files. When I use rm, I want rm -i to happen.
1
vote
1answer
58 views

Batch command to change each file's creation date to match the information in the file name

I have a folder with several hundred video files. All files names are in this format: 2011-08-27 11.18.00 Unfortunately the 'Date Created' for each file is the date on which it were converted (a ...
4
votes
4answers
1k views

Dia command line not working

I've got a problem with using Dia from the command line on OSX 10.7.4. I downloaded and installed the OS X dmg from http://dia-installer.de/download/macosx.html I've been using it to create graphics ...
0
votes
0answers
33 views

status 78 on launchctl

I'm trying to load a plist for a PostgreSQL build that looks like this <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd"&...
0
votes
1answer
32 views

Display contents of file and also copy it to the clipboard

I would like to create a helper function that displays my public key in the terminal and also copies it to the clipboard. How would I do that? I tried cat ~/.ssh/id_rsa.pub | pbcopy, but this only ...
0
votes
1answer
44 views

netsh equivalent in OSX

In Windows, I enjoy the ability to toggle the "LAN" NIC between a known static IP and DHCP from the command line interface (CLI) via .bat files: netsh interface ip set address name="LAN" static 192....
4
votes
2answers
2k views

Using the -Bless Command on Multiboot Macs with 10.11 El Capitan

As part of our standard deployment, we tend to deploy multiple OSs on Macs, from 10.7 to 10.11. However, with the new SIP (System Integrity Protection), the -bless command no longer works properly. I ...
0
votes
0answers
32 views

How do I view inline images in w3m?

I am using a mac (el capitan), and trying to use w3m. But I don't see images when browsing pages. My question is: I want to view inline images in w3m, but don't find a way to do so. I have ...
0
votes
0answers
23 views

exec format error: ifconfig

I tried to execute $ ifconfig zsh: exec format error: ifconfig After looking for the binary file: $ whereis ifconfig /sbin/ifconfig At this moment, I read that this error can occur when binary ...
6
votes
2answers
2k views

Change my shell to a different bash version at /usr/local/bin/bash?

How can I set my /usr/local/bin/bash (which is the 4.2 version that allows auto-completion of 'cd to directory with directory name') to be my default bash for a new window instead of my regular (v3.2....
1
vote
1answer
2k views

Make `hostname -f` return fully qualified hostname

How can i make hostname (i.e. the unix commandline tool hostname, invoked in terminal) return a hostname including the domain information? At the moment, hostname, hostname -f and hostname -s return ...
0
votes
0answers
14 views

Change spelling with shortcut

I am using some custom installed dictionaries for the spell checker in Mac, and the automatic detection doesn't work well. The best solution is to manually change them. However, going to Settings > ...
2
votes
2answers
2k views

“xcode-select --install” versus retrieving the dmg from Apple's developer website

I would to ask a question closely related to already existing posts (How to install command line tools without error that is not currently available on Software Update server? and http://stackoverflow....
1
vote
2answers
327 views

How to list audio card IDs from terminal

I am developing a script which deals with sound recording. As user potentially can have multiple sound cards attached, I would like to give him/her a chance to select desired one. The software I use ...
0
votes
0answers
26 views

Possible to force command line to be somewhere else than bottom of the screen?

In my vimrc, I have the following line: let so=999 to force the cursor to stay in the middle of the screen, which is something I find more comfortable. However, when going back to the terminal, ...
5
votes
6answers
14k views

How can I write a script to open multiple terminal tabs and execute code in them?

I want to be able to open the terminal application and have it either automatically run a script that opens several tabs and run an arbitrary set of commands in each. For example I would like one tab ...
0
votes
1answer
16 views

Shuffle PDF 2-up in shell

I want to make a new pdf from my old one: put portrait pages 1 & 2 on a landscape page 1, pages 3 & 4 on page 2, and so on. Preview.app does this, but I need to do it in the shell. jPDFtweak....
3
votes
4answers
2k views

How to enable/disable Do Not Disturb from shell on Mavericks

I would like to toggle the Do Not Disturb in the notification center with a keyboard shortcut. I am using better touch tool for some extra keyboard shortcuts but it does not support enabling/...
1
vote
0answers
18 views

How to run OS X 10.10 install via command line?

I am trying to create a script that wipes/partitions the hard drive of old macs and reinstalls OS X so that I do not have to click through the user interface. I can run wipe the disk, but I cannot ...
5
votes
1answer
459 views

less doesn't work

Recently I've noticed that less command doesn't work. $ ls | less CertificateEntreprenuership101.pdf Engineering Software as a Service_ An ...
0
votes
0answers
40 views

Error: It seems the App source is not there: '/usr/local/Caskroom/multibit/0.5.19/MultiBit.app'

I first moved Caskroom to new location mv /opt/homebrew-cask/Caskroom /usr/local for f in ~/Applications/*.app; do oldloc="$(readlink "$f")"; [[ -e $oldloc ]] || ln -sf "/usr/local${oldloc#/opt/...
0
votes
0answers
8 views

how do I see for existing volumes if the FileVault recovery key is stored in iCloud

I own several Macs (also for family members) and the first thing I do is turn on FileVault. How do I check if the recovery key is not stored in iCloud (for existing volumes, not new ones)? If you'...
0
votes
1answer
28 views

Exception in thread “main” java.lang.UnsupportedClassVersionError (Trying run Alda on OS X)

I've hit a wall with trying to get Alda to run on OS X. It's an executable I downloaded from here; then, as per the installation guide on GitHub, I ran chmod +x alda on it, and then moved it to my /...
7
votes
1answer
7k views

Missing .bash_profile and .bashrc files

I don't have .bash_profile or .bashrc files and I am definitely using the bash shell. I am using Mac OS X 10.11.1 El Capitan. How do I permanently modify my $PATH to cut down the default values Apple ...
0
votes
1answer
948 views

Is it possible to switch from Safe Mode to Normal and back without a reboot?

Since 10.6.3, Apple has decided change the AppleIntelCPUManagement kexts, which leave me stuck with a kernel_task that pegs out at 135-185%, generating a lot of heat. Anyway, since I doubt anyone has ...
5
votes
1answer
292 views

Removing XCode while keeping the command line tools (on El Capitan)

As by subject. There are a number of links, such as this that deal with the issue but are not El Capitan specific and/or are just not that on the subject or are not up to date. Is it possible to ...
56
votes
9answers
18k views

How do I speed up new Terminal tab loading time?

How can i speed up the terminal startup in Lion? I'm not referring to the startup of the Terminal application, but to the startup terminal windows, like when i open a new tab. I don't have anything ...
3
votes
2answers
532 views

Where is “mkpasswd” for OSX?

There is a well-known unix utility called mkpasswd available on many *nix systems. I was just trying to use it from terminal on an OSX 10.10.5 Yosemite (Early 2015) machine, and it is nowhere to be ...
147
votes
6answers
71k views

git auto-complete for *branches* at the command line?

On my linux machine I have autocomplete for branches with git. [Note we are talking about git branch completion, not bash completion (e.g. commands, files, etc). Thus NOT lane's answer at all] For ...
17
votes
2answers
2k views

Why is lsof on OS X so ridiculously slow?

I can't figure out why lsof on my Mac (10.8.2, MacBook Pro) is so slow. On my Mac, lsof takes more than a minute: $ touch /tmp/testfile $ time lsof /tmp/testfile real 1m16.483s user 0m0.029s ...