- or download this
# Remove all empty files in '$dir' and below. </p>
my $dir = "/some/path";
system "find '$dir' -size 0c | xargs rm";
- or download this
!#/bin/perl
# To remove all 0 byte file in a folder
my $dir = "/home/bob/mytemp";
system "find '$dir' -size 0c | xargs rm";
- or download this
find . -type f -size 0 | xargs rm
- or download this
find /home/bob/mytemp -type f -size 0 -exec rm {} \;