Linux.com

My aliases

Posted by: Anonymous Coward on December 13, 2005 02:29 PM
Why such complicated aliases for listing files? I prefer to have these (with parameters arranged in a mnemonic way):

List all files (including hidden), sorted by modification time:
ls -ltrAh
ls -trAsh
List all files (including hidden), sorted by creation time:
ls -crAsh
List all files (including hidden), sorted by size:
ls -SArsh

I use ll for the first of above, lc for the second, and lss for the last.

These are also useful:

Show disk usage of each file and directory (including hidden) inside current directory (sorted by size):
du -smc<nobr> <wbr></nobr>.[^.]* * | sort -n
du -skc<nobr> <wbr></nobr>.[^.]* * | sort -n
Show disk usage of each directory (including hidden) inside current directory (sorted by size):
du -smc<nobr> <wbr></nobr>.[^.]*/ */ | sort -n
du -skc<nobr> <wbr></nobr>.[^.]*/ */ | sort -n

#

Return to CLI Magic: Daily aliases