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)

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....
0
votes
0answers
12 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. ...
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
16 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
427 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
15 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
6 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
17 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
6k 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
944 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
246 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 ...
55
votes
9answers
17k 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
457 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 ...
138
votes
6answers
69k 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 ...
0
votes
1answer
109 views

Last command source file

Despite what I thought, there does not seem to be any concrete/modern answer on the net, so my question is: where does the last command get its information from? I have found the file before, but ...
1
vote
2answers
64 views

Finding files with square brackets in filename

I have a ton of files - TOSEC ROM sets - on my Mac (El Capitan) that have filenames suffixed with a tag in square brackets - for example Manic Miner (1983)(Bug-Byte Software)[a] Manic Miner (1983)(...
3
votes
3answers
1k views

How can I determine if the screen is asleep in Mountain Lion, from the command line?

I have a script that needs to run every so often, but only if the screensaver is active or if the screen is asleep (to make sure nobody is actively using the computer first). I need to have a way to ...
0
votes
1answer
32 views

Terminal.app and tmux session, can't use “open” command (without tmux it works)

I use Terminal.app and a tmux session. > open -a VLC file.mp4 The window server could not be contacted. open must be run with a user logged in at the console, either as that user or as root. ...
2
votes
2answers
8k views

How can I make an Automator service run a shell script and display the output?

I'm using Automator to run a shell script (ffmpeg transcode to h264) as a 'Service', so that I can just right click the high res .mov file and select the service. It works fine, but as it's ffmpeg it ...
2
votes
4answers
47k views

How to send text with telnet in Terminal?

I would like to send some text to a port on my machine using telnet in the Mac OS X Terminal. I start telnet using: telnet localhost 8080 Then I type some text. Is that text send automatically or ...
0
votes
1answer
28 views

Command-line keychain access not showing any results [duplicate]

I have been trying to learn to control my computer through command-line, and keychain access is what I am trying now. I have been using the security command, and attempting to get my wifi password (I ...
0
votes
1answer
36 views

Problem “do shell script” on curl – Works in Terminal, but not via “do shell script”

I want to use "curl" with "do shell script" in an apple script. It already worked some months ago, but then the provider changed to https-only service. So I update curl on Mac OS Terminal: $ curl -V ...
2
votes
3answers
1k views

How to remove space character (whitespace) from end of filenames and foldernames?

Problem with mac is that it allows space character at end of file or folder. If this file or folder with space character in end is beeing copied to FTP using Filezilla or Dropbox then mac makes ...
0
votes
1answer
39 views

How to encrypt zip file and filenames via command line?

Using command line on Mac, I know that I can encrypt a directory with the following command: zip -er Directory.zip /path/to/directory However, this does not encrypt the filenames themselves. If ...
0
votes
0answers
8 views

How Deep Do I Need To Define Paths for the Cosign Terminal Command?

My company is registered as an Apple Developer. Our firm has created Mac apps outside of Xcode that we want to code sign. They will run on OS X 10.8+. This link shows the tasks needed to code sign ...
0
votes
1answer
40 views

How to remove __MACOSX folder in a list of zip files (not a single zip file)?

I know I can remove __MACOSX in a zip file by: sudo zip -d bg1.zip "__MACOSX*" but I want to remove it in all zip files, I tried sudo zip -d *.zip "__MACOSX*" but it says zip warning: name not ...
34
votes
6answers
123k views

How do I start TextEditor from the command line?

I work a lot at the command line in a Terminal and would like to start a text editor on a certain file. I'm from Linux Land and normally use kwrite or gedit from a bash shell. Trying to find the Mac ...
10
votes
5answers
10k views

PageUp and PageDown keys for Irssi (IRC) in Macbook?

I cannot find the keys on my mackbook. I need them to go page-up and page-down in irssi (IRC). I have tested the tips here but they do not work. They model some different Up/Down, not the traditional ...
0
votes
0answers
9 views

duplicate image: find the same image in different resolutions (low, middle and hq)

There are lots of Open Source (brew) and App Store software about duplicate image finder. Mostly they do things like a checksum on files. I have a different use case. I have the same image in lot of ...
5
votes
2answers
6k views

How do I install handbrake cli?

I've downloaded the Handbrake CLI. What's the best place to install a command line app on my Mac?
7
votes
3answers
814 views

Moving .bash_profile to Dropbox

I'd like to move my .bash_profile to Dropbox to have my custom Terminal functions available on all my Macs. Is this possible and are there possible implications? For example I have a command for ...
6
votes
3answers
10k views

Is there any way to access the console logs on an iOS 8 device without installing Xcode?

The title says it all. Prior to iOS 8, one could use iPhone Configuration Utility, but that no longer works. Is there any other way to access these logs without installing the gargantuan XCode? Are ...
1
vote
1answer
36 views

output of the who command

I am trying to understand the output of the who command. When I add the -H flag to print the headers, the second column ( the one signifying the users logged in) is titled LINE. I am trying to ...
-1
votes
0answers
18 views

How can I change the language to english from japanese of applications ran in terminal?

the language of the applications ran in shell (like Wine or ssh and sshfs) changed language to japanese (see image below) but when i use the terminal normally it's in english, does anyone knows what ...
0
votes
1answer
36 views

Does the `mdls` terminal command access metadata in resource forks?

I always knew that Mac operating systems had a concept of "resource forks" but have just learned that this feature has in fact been deprecated since the arrival of OS X. I also just discovered the ...
3
votes
1answer
38 views

what is the style of command line editing used by the terminal emulator?

in bash in gnome terminal in Ubuntu, the command line editing commands are by default emacs-style, and can be changed to vim-style. In bash in the terminal emulator of Mac, the emacs-style commands ...
2
votes
0answers
40 views

How can I install bind-utils on El Capitan

I would like to use DNSSEC tools (like dnssec-keygen, dnssec-signzone, ...) on my Mac without running or installing the BIND9 service. Unfortunately for me Homebrew seems only to have the BIND9 ...
1
vote
0answers
27 views

Bash Ctrl-A Returns to Start of Line but Doesn't Display Properly

When I ssh into a Linux server from bash Terminal, I can use CTRL+A to return to the start of line properly, and CTRL+E to go to end of line and everything works fine. When I use bash locally on my ...
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
2answers
95 views

Find readable with Permissions as POSIX?

Aimed systems: Linux and OS X. Original code which works in Ubuntu 16.04 but not OS X, but follows unsuccessfully POSIX standards gfind ~ ! -readable -prune -o -type f -name "*.tex" where ! is ...
5
votes
2answers
330 views

Installing fonts from terminal instead of Font Book?

I know how do install new fonts using Font Book. Is there also a way to install fonts from the terminal, using some smart shell command?
0
votes
1answer
15 views

How can I tell if a particular directory is connected to a remote machine?

I've found various ways to check if a particular directory is mounted under NFS (here, for example), but none of them seem to work on OS X. How can I check if a particular directory is an NFS ...
8
votes
1answer
97 views

checking path capitalization of pwd

Is there a quick way to check in terminal that the terminal command pwd returns the correct capitalization of the path? Note that if you do cd ~/desktop then pwd would tell you that your path is /...
3
votes
3answers
159 views

Find executables associated with Homebrew Formula

Some Homebrew formulas have names that do not correspond with any of the installed commands (e.g., coreutils, speech-tools), other formulas provide an command that matches up with the name, but also ...
4
votes
2answers
11k views

May I have a list of “System” group names, and their respective gid(s)?

I know there are group names such as "Staff" and "Admin", but are those the only ones? I suspect that the root user should also be assigned in a group. Using the command dscacheutil -q user tells me ...
0
votes
1answer
236 views

lshw or lspci for Mac OS X

What's the closest alternative to something like lshw or lspci on Mac OS X? The closest thing I know of is system_profiler but it spits out way too much unnecessary information.
11
votes
2answers
3k views

Shell Script for Yesterday's Date

I'm trying to execute the following shellscript with hazel app on any file in the folder. It works, but the only thing thats causing a problem is the date for yesterday. #! /bin/bash saveDir="TJ" ...