Monthly Archives: August 2011
Find Files Over A Certain Size on Web Server
Written on August 24, 2011 at 2:03 pm, by Matthew
To find files over 30M the following could be used: find / -type f -size +30000k -exec ls -lh {} \; | awk ‘{ print $5 “: ” $9 }’ |sort -n Helps if you are running out of space. It can take a while to complete though so have patience!
Command Line Delete Files Over A Certain Age
Written on August 24, 2011 at 2:01 pm, by Matthew
How to find files and delete them over a certain age: EG .html files over 28 days old find -name “*.html” -mtime +28 -type f -exec rm {} \;