How do I recursively remove files that are less than 1MB in size from a directory?
|
feedback
|
migrated from stackoverflow.com Feb 9 at 7:15
This question came from our site for professional and enthusiast programmers.
|
This can be done with
Note that this will recursively descend into subdirectories, and will unconditionally delete all files smaller than 1 megabyte. Be careful. | |||||||||||||
feedback
|
|
Just for variety and a possible (probably marginal) performance gain:
| |||||
feedback
|
|
You can checkout this link http://ayaz.wordpress.com/2008/02/05/bash-quickly-deleting-empty-files-in-a-directory/ , it has exactly what you want. | |||||||||||||
feedback
|