Find Command: Part I

Posted by Ameya Pandit on June 12th, 2007 filed in Tips & Trix, linux

Its always a headache for administrators to keep track of huge files on the server. We can use the below script to find these files so that the necessary action could be taken.

find / -type f -size +20000k -exec ls -lh {} \; | awk ‘{ print $9 “: ” $5 }’

This command will find all files from / which are of 20Mb of more and will print the file sizes with their name. We can modify the size or the location where we want to search as per our need.

Leave a Comment

Free Domains Hosting at .co.nr Creative Commons License
This work by Ameya Pandit is licensed under a Creative Commons Attribution 2.5 India License
Photo Album