Linux command "du" disk usage

Written By smart| 20 June 2009| No Comment

To check the directory with largest sizes in kilo bytes
du -sk * | sort +0nr (largest size at top)

or

du -sk * | sort -nr

To check the directory with largest sizes in Mega bytes

du -sm * | sort +0nr(largest size at top)

or
du -sm * | sort -nr

To check the directory with largest sizes in kilo bytes

du -sk * | sort +0n(largest at bottom)

or


du -sk * | sort -n

To check the directory with largest sizes in Mega bytes
du -sm * | sort +0n
(largest at bottom)

or
du -sm * | sort -n

To check the size of hidden directories

du -sk .[a-z]* | sort +0nr

To check the size of all the files and directorires including hidden files and directories


du -sk .[a-z]* * | sort +0n

To list all the directories  with above 1GB  size

du -h | grep ^[0-9.]*G

Related Posts with Thumbnails

Share With Others

Leave your response!




Comment moderation is enabled. Your comment may take some time to appear.