Better way of viewing directory use other than du/df/discus?

Edit: Linode 512, runnin Ubuntu 10.10, plans to upgrade to natty tonight

So, I noticed about half of my available space is in use. I know my /srv/www/ directory is taking up only about 2 gigs, but I have also found that 4 gigs are in use else where. I've narrowed down about another 2 gigs, using various du commands such as setting the maxdepth to 1 so I dont have an endless list of subdirs included, to my /var/low folder. Is there a better visual way of viewing where this space is going? I did also notice some very large log files and I just cannot seem to find much info on what they're for and if/how to clear them, like debug.1 etc.

3 Replies

I've got this in a text file and use it once in a while. Finds the 30 largest files in my home directory:

find ~/ -mount -type f -ls|sort -rnk7 |head -30|awk '{printf "%10d MB\t%s\n",($7/1024)/1024,$NF}'

I'm not sure if it would be terribly slow or not, but JDiskTools offers a pretty great disk space analyzer. You could mount your drive with sshfs on your local box and have it analyze it. You'll get a pretty clickable pie chart.

I tend to use something like:

du -mac | sort -nr | head -n20

That will get you your top 20 biggest files or directories, in order or space used, with their size listed in megabytes.

On Windows, I've always used windirstat, which is pretty awesome. Shows the entire hierarchy with folder sizes sorted by percentage use, and shows it graphically in a purdy treemap that makes it trivially easy to spot the largest files and folders.

Now, why do I mention a Windows tool? Because it's a clone (albeit an improved one) of kdirstat. So if you've got a UI set up on your linode (perhaps for VNC/nx/etc), you can give that a shot.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct