What always surprises me is that so many don't know or use the directory stack commands, pushd and popd. I'll admit I was also ignorant of them until something like 2005, but once I learned of them I switched and never looked back. Now I can't see someone write or type "cd" without a little bit of a cringe.
OS X Command Line Utilities
21–30 of 243 posts
Re: OS X Command Line Utilities
#22/usr/local is the default location for user-installed stuff, but I personally like to have my package manager do its stuff in a separate directory. I like the way Fink [1] uses the /sw (software) directory. Does anyone have a valuable opinion on the comparison between Fink and Homebrew — or maybe MacPorts? [1] http://www.finkproject.org
Re: OS X Command Line Utilities
#23no love for macport?
Re: OS X Command Line Utilities
#24One tiny thing though, at the bottom it says
> Recall that OS X apps are not true executables, but actually special directories (bundles) with the extension .app. open is the only way to launch these programs from the command line.
Actually, you can launch them in other ways. Example
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --user-data-dir=/Users//temp/delmechrome --no-first-run
Will start a new instance of Chrome with it's own datastore in ~/temp/delmechrome. add some URL to the end to have it auto launch some webpage. Delete ~/temp/delmechrome to start over.Re: OS X Command Line Utilities
#25 open /Applications/Safari.app/
as an example, when open -a safari
does the same thing.Re: OS X Command Line Utilities
#26Re: OS X Command Line Utilities
#27Great list! Includes all the old favorites with clear explanations. This is only tangentially related, but I recently wrote a little Automator Service to gather any selected file and folder paths from Finder. I very often need to grab the path of something for programming-related stuff, and doing it from the command line or with the mini-icon drag-and-drop takes way too long. Maybe somebody here will find it useful!…
Re: OS X Command Line Utilities
#28What always surprises me is that so many don't know or use the directory stack commands, pushd and popd. I'll admit I was also ignorant of them until something like 2005, but once I learned of them I switched and never looked back. Now I can't see someone write or type "cd" without a little bit of a cringe.
If you haven't tried it, I highly recommend z. It's impossible to Google for, but it's oh-so-convenient.
Re: OS X Command Line Utilities
#29These are awesome. I didn't know about many of them. One tiny thing though, at the bottom it says > Recall that OS X apps are not true executables, but actually special directories (bundles) with the extension .app. open is the only way to launch these programs from the command line. Actually, you can launch them in other ways. Example /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --user-data-dir=/Us…
The open command does allow you to specify command-line arguments to pass to the application (via --args), which is generally a safer way to do things.
Re: OS X Command Line Utilities
#30For example, I set the letter 'o' as an alias for 'open' on OS X, and to "thunar" on Xubuntu and "nemo" on Linux Mint.