Click to See Complete Forum and Search --> : How do I show size of all directories on a drive?


aaron
02-22-2001, 01:30 PM
I would like a listing of all the subdirectories on a drive and how big they are (in MegaBytes). Is there a native bash command that will do this, or a console program that will do it?


Aaron

ph34r
02-22-2001, 01:45 PM
man du
man df

blink
02-22-2001, 02:18 PM
Not near my linux box right now (it's at home)... so one dumb question is burning unawnsered in my mind.....

Will these commands show the size of the individual directorys or the entire partition (i.e. free space)?

Thanks for helping

X_console
02-22-2001, 02:21 PM
To get a list of the size of a directory use "du -hs <dir>" Eg:

$ du -hs /home
167M /home

aaron
02-22-2001, 03:26 PM
It looks like DU is just what the doctor ordered. Its amazing how many handy commands are hidden within Linux!

Thanks guys.