Delete empty files using find
The following command will delete all empty files in the current directory and in all of its subdirectories:
find . -size 0 -delete
There is also a
-empty flag, but it's not POSIX
find . -empty -delete
-maxdepth 1 to limit the search only to the current directory (no subdirectories)
. (dot) is optional only for Linux. On macOS it is required to specify it.