List sub-directories recursively and order them by size
Posted on 2011-10-18
I often get alerts from our disk monitoring system for space usage. We have thousands of directories used by number of applications and often finding culprit takes time.
I have used du to locate details but I think there is a better way to do this job.
$ du -smc * | sort -n
Above command returns size just 1 level down. I need something to traverse n levels.
Please note this needs to be done recursively & then ordered by size. I need to have last node of directory->sub-directory tree & not top node