If you use the Console frequently in OSX, you will be very familiar with the ‘ls’ command. Here is a quick tip:
Add the following line to the “.profile” file in your home directory (creating the file if it doesn’t already exist):
alias ls="ls -hGlrt"
Note that case is important.
Now, when you type ‘ls’, rather than seeing:
You see the much nicer (IMHO):
Specifically, here are what each of the -hGlrt options do, so you can mix and match as you like:
- l : Show a “long form” listing, which includes permissions, dates, and sizes
- G : Switch on color output
(This confuses a lot of people, because on Linux you use the
--coloroption. Many people actually recompile ‘ls’ thinking that color is unsupported, its amazing the time you can save by reading the man page!)
- h : Show file sizes in a more human readable form
- rt : Sort the files ending with the most recently modified (thanks to Tim for this suggestion!)