Deleting a very large amount of files inside a folder

April 12th, 2017 Posted by Blog, Tips 0 thoughts on “Deleting a very large amount of files inside a folder”

Sometimes you have to delete a very large amount of files inside a folder.

When ls and rm reach shell limit that make impossible to use them. Perl is at the rescue.

perl -e ‘for(<*>){((stat)[9]<(unlink))}’

Continuous S.A.
11 boulevard du Jazz
L-4370 Belvaux
Luxembourg

© Continuous S.A. 2017