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.
Avenue des Hauts-Fourneaux 9
L-4362 Esch-sur-Alzette
Luxembourg

© Continuous S.A. 2017