Useful for analyzing disk usage. If you prefer GUI try http://en.wikipedia.org/wiki/Filelight or http://www.marzocca.net/linux/baobab/ Show Sample Output
du only accepts lines ending with a NUL, which can be a pain to create. This solves that issue.
Got a file you're generating and you want the size without typing in 'ls -l file' all the time? Use this instead. Show Sample Output
Warning!, if the pattern didn't find anything it shows the total size of dot dir Show Sample Output
This command shows the size of directories below here, refreshing every 2s. It will also track directories created after running the command (that what the find bit does). Show Sample Output
A really useful pair of du options. Show Sample Output
sudo is optional, but to find out about all files, it is nice, or else run as superuser, ie: su -c 'du -sm * | sort -n' Show Sample Output
This Command will list files & folders which are in GBs. G can be replace by M to get files in MBs.
Output made so that it will match initial suggestion for this task. Personally, I think that output of du -h is more readable.
print sum of disk usage for filetype within current dir and subdirs Show Sample Output
Credit goes to brun65i but he posted it as a comment instead as an alternative. I hadn't noticed the -h option on sort before and this seems like the cleanest alternative. Thanks Brun65i! Show Sample Output
Shows the size of the directory the command is ran in. The size is in MB and GB. There is no need to type the path, its the current working directory. Show Sample Output
6 characters counting whitespace!
"-exec" ftw.
the -h option of du and sort (on appropriate distrib) makes output "Human" readable and still sorted by "reversed size" (sort -rh) Show Sample Output
without reverse...
commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for: