Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'Another means of getting a disk usage summary' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Another means of getting a disk usage summary
Authored by: MartySells on Oct 22, '04 12:38:47AM
I like this one. Adding | sort +0n on the end will show largest things at the bottom of the output. du -hcd 1 seems very close to what this tip does but also includes a total at the bottom.

Rob forgot to mention one I submitted - Create HTML disk usage trees from du output. With it you can run one "du -k" into an output file and then render multiple different trees without the overhead of doing a new du for each tree - it's a little higher level than the script-bits discussed here.

Regarding different versions of du and what options they support:
  • -k and -h are mutually exclusive. If you specify both the -k has no meaning.
  • Some versions (GNU) let you specify -H or --si which are like -h, but use powers of 1000 not 1024.
  • The OS X df command supports both -h and -H in this way but the OS X du command only supports -h (-H on the OS X version has a different use)

[ Reply to This | # ]