How to Remove Million Files in a Directory You can use this command $ perl -e ‘for(<*>){((stat)[9]<(unlink))}’ which performs faster than $ rm -f *