If you quickly want to get an overview of which folders and / or files use up the most space in a certain folder there is a really easy pipe of commands you can use, that should come with basically all of the linux distributions – no installation required therefore.
- The first part will list all the files in a human readable format and their respective space consumption in the folder /tmp:
“du -hsc /tmp/*” - This output will be sorted from largest to smallest files / folders using the sort command:
“sort -nr” - This output can be reduced to the top ten entries by using the head command
By piping these commands together, you get a nice, little, quick overview:
“du -hsc /tmp/* | sort -nr |head”
UPDATE:
After Mikes’ comment, I now recommend to use the following command. See the comments section for details:
“du -hsc /* | sort -nr | head”