Directory using the most disk space

Matthew Carpenter matt
Mon Dec 27 23:38:02 PST 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

When I don't have kdirstat installed (runs over X as well),
I always prefer: "du -sx <basedir>/* | sort -n"

Spits out dirs/files nicely sorted by usage and sticks the big ones at
the bottom.

# du -sx  /backup/* | sort -n
0       /backup/DAILY-system.1.tar.gz
0       /backup/DAILY-system.2.tar.gz
0       /backup/MONTHLY-system.log
0       /backup/MONTHLY-system.tar.gz
<SNIP>
3115952 /backup/WEEKLY-data.1.tar.gz
3149309 /backup/WEEKLY-data.tar.gz
3372525 /backup/MOVIES
7363360 /backup/MONTHLY-data.tar.gz
8272727 /backup/MONTHLY-data.1.tar.gz
9814996 /backup/gandalf-Tue Jul  8 23:55:56 EDT 2003.tar.gz
11127836        /backup/WinXP.hda2.dd
15895135        /backup/MONTHLY-data
16016021        /backup/MONTHLY-data.2.tar.gz
33934343        /backup/anonftp


Net Llama! wrote:
| On 12/27/2004 07:21 PM, Chong Yu Meng wrote:
|
|> -----BEGIN PGP SIGNED MESSAGE-----
|> Hash: SHA1
|>
|> Hi all,
|>
|> I have a filesystem that is about 90% full, and I know that an
|> application is probably dumping a lot of log data into a directory. I
|> don't own the server or the directory, but I do have sudo access.
|>
|> This is probably a stupid question, but is there a command for locating
|> the directory taking up the most disk space?
|
|
| du -m /
|
| shows results in MB.
|
|

- --
Matthew Carpenter
matt at eisgr.com                          http://www.eisgr.com/

Enterprise Information Systems
* Network Server Appliances
* Security Consulting, Incident Handling & Forensics
* Network Consulting, Integration & Support
* Web Integration and E-Business
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFB0OPcso9lqh4MragRAglIAKCwFP/05GRhGaz4vYi0cLigIlw86wCfQe0T
56gwVy9TK4FRiNRl4nefUCs=
=pYpk
-----END PGP SIGNATURE-----



More information about the Linux-users mailing list