How to Delete Millions of Files from a Folder
- 10 July 2014
- Volodymyr Hodiak
- And More
- 3662
By the way, how to delete millions of files from one folder? I often come across this question on forums.

it’s true that a common method rm -rf fails if there are too many files (I haven’t counted exactly ). There’s a solution.
Search for files by mask and the files with these names will be deleted.
# find /path/to/files/ -type f | xargs rm
Now you can have tea and cookies.
Click the “like” button if you find the article useful.