Find Large Files Wasting Disk Space
by damonp on September 19, 2005
in Snippets
Find files over 8000k on all mounted drives and print the filesize and path:
find /$1 -mount -size +8000k -exec ls -sh {} \;
This one is suitable for a cron job. It does the same, sorts by filesize and mails the result to the supplied email address.
find /$1 -mount -size +8000k -exec ls -sh {} \; | /bin/sort -n | mail email@domain.com
Adjust the 8000k to search for larger or smaller files.
Popularity: 1%
Most Popular Posts

Damon Parker is a freelance sysadmin and web developer in Texas. He specializes
in server setup, server security and high performance server configurations.
Need help setting up a web server or getting a server back online after a crash or
hack? Email Damon