Sort Contents by Size


ls -S

You can also sort by size instead of alphabetically by filename or extension, or by date and time. To sort by size, use -S (or --sort=size).

$ ls -laS ~/ -rw-r--r--  109587 2005-10-19 11:53 .xsession-errors -rw-------   40122 2005-04-20 11:00 .nessusrc -rwxr--r--   15465 2005-10-12 15:45 .vimrc -rw-------    8757 2005-10-19 08:43 .bash_history 


When you sort by size, the largest items come first. To sort in reverse, with the smallest at the top, just use -r.



Linux Phrasebook
Linux Phrasebook
ISBN: 0672328380
EAN: 2147483647
Year: 2007
Pages: 288

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net