How can I get a list of Mac specific terminal commands?
July 14, 2011 7:35 AM   Subscribe

How can I get a list of Mac OS X-specific terminal commands, which is to say, those that are specific to Mac, like 'defaults write' or 'open'?
posted by deeper red to Computers & Internet (8 answers total) 7 users marked this as a favorite
 
Have you looked at "The Command Line Junkie's Guide to Mac OS X"? Not 100% mac-only, but largely.
posted by tractorfeed at 8:15 AM on July 14, 2011


'open' is actually a pretty typical tool and isn't mac-specific either.

I don't know of an answer to your question, but I can point you to the Applescript documentation. It lets you do a lot of very mac-specific things from the commandline.
posted by doteatop at 10:09 AM on July 14, 2011


'say' :)

$ say "I like to poop"
posted by gregglind at 2:46 PM on July 14, 2011


I have often wondered that myself. You can grep all the man pages for "MacOSX" or "Mac OS X". Some of these are compressed though.

In /usr/share/man:
$ find man* -type f -print | egrep -v '.gz$' | tr \\n \\0 | xargs -0 egrep -l 'Mac ?OS ?X'
man1/afscexpand.1
man1/amlint.1
man1/ant.1
man1/AppleFileServer.1
man1/as.1
man1/authopen.1
man1/automator.1
man1/BuildStrings.1
man1/c++-4.0.1
man1/c++-4.2.1
...
For compressed ones:
$ find man* -type f -print | egrep '.gz$' | tr \\n \\0 | xargs -0 zegrep -l 'Mac ?OS ?X'
man1/arch.1.gz
man1/df.1.gz
man1/dig.1.gz
man1/ed.1.gz
man1/emacs-undumped.1.gz
man1/fs_usage.1.gz
man1/glibtool.1.gz
man1/glibtoolize.1.gz
man1/host.1.gz
man1/latency.1.gz
man1/launchctl.1.gz
man1/locale.1.gz
...
It's still not a satisfying "official" list but it's a good start.
posted by chairface at 4:29 PM on July 14, 2011


chairface has the right idea, but the 'Mac ?OS ?X' regexp matches many standard utilities (host, locale, df, dig, are all not OSX specific). I'd replace it with 'First appeared in NextStep' to specifically catch tools with a NeXT heritage.

unfortunately (sorry, I mean "as it turns out"), Apple isn't including a useful History section in the manpages for new utilities. you could make a more comprehensive list by looking through every APSL licensed bundle in the Darwin source release, but that'd be tedious.
posted by russm at 12:32 AM on July 15, 2011


There is an additional complexity. Some standard utilities have mac specific extensions. For example, "ls" supports an "-@" option that neither FreeBSD nor GNU/Linux recognize. Try "ls -l@ /".
posted by chairface at 9:40 AM on July 15, 2011


I have a web page that may help: An A-Z Index of the Apple OS X command line
posted by Lanark at 5:27 AM on July 16, 2011


another non-perfect answer - I compared the contents of my $PATH with the list of all items that get installed in standard bin directories in Debian, and diffed out the the ones that are only on my laptop.

http://209.213.123.41/osx-cmds.txt

some of these (eg. zbatery) are local installs of mine, some (eg. yacc) are provided on debian through the alternates mechanism so aren't listed in the source database I used, and some (eg. wish vs. wish8.6) get different install names on the two platforms. but it's in OSX and it's not in Debian, it's in that list.
posted by russm at 11:37 PM on July 17, 2011


« Older Help with San Francisco lodging   |   Crown Heights for real now. Newer »
This thread is closed to new comments.