3 ms·
This blew my mind recently, when I had to delete millions of files in a directory and rm didn't make the cut (too many arguments), and find -delete took forever
by a_bonobo 8y ago
This blew my mind recently, when I had to delete millions of files in a directory and rm didn't make the cut (too many arguments), and find -delete took forever:
https://unix.stackexchange.com/a/79656 https://unix.stackexchange.com/a/79656
perl -e 'for(<*>){((stat)[9]<(unlink))}'
seems to be the fastest possible way to delete enormous amounts of files
- mkl 8y agoDid you try xargs, to do groups of files at once? That's what I usually do: find -type f -print0 | xargs -0 rm