Are you looking for my non-technical blog?

This is now my technical-only blog, my non-technical blog is here.

16 July 2006

du | sort -n -r

du (abbreviated from disk usage) is a Unix computer program to display the amount of disk space used under a particular directory or files on a file system.
sort is a standard Unix command line program that prints the lines of its input or concatenation of all files listed in it's argument list in sorted order. The -r flag will reverse the sort order.
So here you are how to display the amount of disk space used under a particular directory in a descending order: du | sort -r -n
Notice: The -n makes the sort commant sort according to numerical value.

Tags: , ,