Find files/folders that are filling up disk space [duplicate]
Possible Duplicate:
How can I determine what is taking up so much space?
I just had an old server go belly up because it ran out of drive space. I am logged in to the shell, and I'm trying to find more unused files to remove.
Is there shell a command, script, or app that will display the largest files/folders?
Solution 1:
This command will help you find big directories 5 levels deep. It also orders the directories by the size.
I had a similar problem long time ago where apache sessions where filling my disk and slowing down my web server.
du --max-depth=5 /* | sort -rn
Solution 2:
The largest top 10 files and directories with size in a human-readable format:
du -shx /* | sort -rh | head
Solution 3:
The du
command will get you this information. For example:
cd /
du -sm *
9 bin
18 boot
1 dev
6 etc
685 export
1 home
...