Find largest directories on linux. Analyse disk space usageBy neokrates, written on November 18, 2011 |
howto |
- neokrates
- Email: uwarov@yahoo.com
- Website: http://www.thinkplexx.com
- Join date: 05-31-09
- Posts: 20
The setup of your CI environment is?
- We don't use CI (100%, 8 Votes)
- Just CI tool located on one of our developers computers (0%, 0 Votes)
- Dedicated server for single CI tool (0%, 0 Votes)
- Dedicated servers with independent CI instances (0%, 0 Votes)
- Dedicated servers for master-slave configuration of CI (0%, 0 Votes)
- Many CI setups distributed through teams (de-centralized setup) (0%, 0 Votes)
- We use external cloud for builds (0%, 0 Votes)
- Different setup (0%, 0 Votes)
Total Voters: 8
Loading ...
Where is all my linux disk space? What used all my disk space? du command has many useful options to analyze the disk usage.
The following method allows to track down the “biggest offenders”, directories which take most space in, more then GB, then hundreds MB..
I used two additional options here :
-hx /
-h = human readable, prints G or M sizes.
-x / says to stay on the same device, in this case root device.
You can skip -x / if you analyze all mounted devices.
100 dirs with size over Gb:
> du -hx / |grep ^[0-9.]*G | sort -rn| head -n 100
10 dirs with size over Gb:
> du -hx / |grep ^[0-9.]*G | sort -rn| head -n 10
10 dirs with size over M:
> du -hx / |grep ^[0-9.]*M | sort -rn| head -n 10
This way, you can get a list of dirs, first more then Gb big, then largest Mb dirs.
Such list can be sorted, grepped, etc, to find the root cause of you hard disk problems …
Here are more commands to try :
http://stackoverflow.com/questions/32230/tracking-down-where-disk-space-has-gone-on-linux
|
LEARN MORE (amazon bookstore)
|
|
TAGS
|
|
RELATED
|
Pages
Posts
|
|
SOCIAL
|


















