Better way of viewing directory use other than du/df/discus?
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
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.
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.
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.