Listing files by size in UNIX


If you want to have a listing of the files sorted by size, you can use the following command(s), it will list the files in decrease order. if you need to do the same thing recursively,you could use the second one.

ls -l | grep ^- | sort -nr -k 5 | more

ls -lR | grep ^- | sort -nr -k 5 | more

Comments

Popular posts from this blog

Graylog - an easy solution for log management

HPUX Tips