[OSX-Users] Re: scroll back buffers?Re: lion -or something - eating gigs?

Philip Boulain prb at ecs.soton.ac.uk
Tue Jan 3 19:01:05 GMT 2012


On 03/01/2012 15:47, Andrew Paul Landells wrote:
> My tried-and-tested Unix method for finding runaway files is to run 
> 'du -ks * | sort -n' in / as root
You'd be better off using 'du -k .', just in case you have any huge 
dotfiles. This isn't as pedantic as it sounds: modern Linux desktop 
distros will saddle you with the likes of ~/.cache and ~/.thumbnails and 
~/.gnome-folder-of-crap-of-the-week.

Good old find(1) is also useful if you only care about large individual 
files (or recent ones, or or or etc.), not folders packed with millions 
of small files. For example, to find all files over 1GB:
find / -size '+1G'
or to then give you the top ten offenders:
find . -size '+1G' -exec du -k '{}' \; | sort -rn | head -n10

More in the find manpage obv.

-- 
Phil


More information about the Osx-users mailing list