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: CaptCosmic on Oct 21, '04 11:29:29AM

Or you could just use the '-s' flag to the du command.

'du -shk *' will give you a list of all the directories and files in the current directory along with their sizes in human readable format.

---
Capt Cosmic



[ Reply to This | # ]
Another means of getting a disk usage summary
Authored by: Nabby on Oct 21, '04 05:04:53PM

Actually, they give slightly different outputs. I guess it depends on your needs. The script will give you hidden directories and not show you files in the current directory. The command by itself, with the -s option, will omit the hidden directories, but give you the size of the files in your current directory. Neither appears to give the size of hidden files in the current directory. As I said, it depends on your needs as to which works best. I like the scirpt, as I was able to quickly port it to my AIX boxes at work, and they don't have the whole "human readable" option down, so I like the formating of the scirpt output.



[ Reply to This | # ]