08/06/2008

Deleting more files tham rm can handle

I had to delete something between 20000 and 100000 bitmaps at work, which exceeded the 128k buffer for rm arguments.
Solution and extended discussion found here:
$ find . -name '*.bmp' | xargs rm
$ find . -name '*.bmp' -print0 | xargs -0 rm in case the file name contains spaces.

No comments: