Last Updated: December 26, 2018
·
1.083K
· vquaiato

counting 0 byte files

I did a web crawler to download some mp3 files, but some files had problems and not downloaded properly resulting in 0 byte files.

then to list those files:

find . -type f -size -1c

and to count those files:

find . -type f -size -1c | wc -l

and to delete those files:

find . -type f -size -1c -delete