Deleting thousands of files in a single directory

Deleting thousands of files in a single directory

Pro tip, use perl. It's the fastest. This drained a mqueue-client folder that got out of control very quickly.

Change to your directory

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

Or make a script and put it in /usr/local/bin/nukethisfolder

#!/usr/bin/perl
perl -e 'for(<*>){((stat)[9]<(unlink))}'