Linux: Find empty file and delete them

For the current directory only:

find ./ -maxdepth 1 -type f -size 0 | xargs rm -f

Include all sub directories

find ./  -type f -size 0 | xargs rm -f

Empty Directory?

find ./ -type d -empty

Leave a Reply

Your email address will not be published. Required fields are marked *