If we’re going a bit off-piste, Julia Evans recently created a ‘Bite Size Command Line’ zine that’s hand-drawn and gives explanations of 20-30 different command line tools and some of their more useful arguments and combinations.
If you’re going to be spending a lot of time on the command line, it may also be advisable to spend some time customising your bash profile (provided you use bash). I found some great ideas for shortcuts in Nathaniel Landau’s .bash_profile that I rely on every time I’m in Terminal.
One clever tip from the Take Control Book for your .bash_profile:
Open a Man Page in Preview
psman() {
man -t "${1}" | open -f -a /Applications/Preview.app/
}
This isn’t exactly a terminal command, but it make working with shell scripts a whole lot easier across multiple computers. Dr Drang talks about creating a ~/bin folder in Dropbox.
I love the command bro which presents brief user supplied examples such as the ones above directly in the terminal. Think of it as a man that only shows concrete examples.
Installation instructions and online access to the examples: http://bropages.org
Yes great app, but if you have keyboard maestro you can build macro to do this, or use the macro contributed by @JMichaelTX in the keyboard maestro forum.
A simple command that I use all the time. This produces a long listing of a directory’s contents with file permissions, owner, size, etc. In your .bash_profile add this:
alias ll="ls -l"
You can tailor the command to your liking by adding more options.