Contact

E: Peter Davies
P: 0845 310 5320

SocNet's

Blog‎ > ‎

Find and delete zero sized files

posted 18 Aug 2009 03:01 by Peter Davies
I recently had a "disk full" issue on a server but even after clearing out the apache logs that had failed to rotate the website that the server was running showed broken images where thumbnails should be.

After a little investigation it turned out the thumbnail code had tried to replace/create "zero" sized thumbnail images. The complication was that the images were spread across multiple directories meaning that it was going to be almost impossible to delete manually.

A combination of Google searches resulted in:

find ./ -type f -size 0 -exec rm {} \;

Very useful! And of course I backed up first!

  Sign in   Recent Site Activity   Terms   Report Abuse   Print page  |  Powered by Google Sites