Bash - Delete files by Size
We can delete all files in specific folder by using these commands :
sudo find /path/fo/folder/ -type f -size -100k -exec rm {} +
just for information about value of -size
:
- -100k means all files that have size below 100kb
- +50M means all files that have size above 50Mb
Written by Noval Agung Prayogo
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Related Tags
#bash
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#