in reply to Finding biggest files

I know this is a perl site, but I think it's important to use the best tool for the job. For this, I think I'd skip using perl (gasp) and just do "find ~/ -size +1024k" This will give you all the files over 1MB. If you get too many results just bump it up to 2048, or 4096, whatever. It's how i find large files. You might also do a du -hs * from your home directory. It'll tell you which directory structures are using the most amount of space. This is helpfull when your problem is lots of little files (like a buildup of temp files) instead of a few large files.

Replies are listed 'Best First'.
RE: RE: Finding biggest files
by plaid (Chaplain) on Feb 29, 2000 at 01:04 UTC
    I totally agree with this comment. Perl is a great language, but it needn't be used for things which standard Unix tools can already do. Find has so many options, I'd suggest you read through the man page, and you'll probably find some combination of arguments there that'll do exactly what you want, such as
    find ~ -size +1024k -printf "%p: %s\n" -ok rm {} \;