Help for this page

Select Code to Download


  1. or download this
    # Remove all empty files in '$dir' and below. </p>
    
    my $dir = "/some/path";
    system "find '$dir' -size 0c | xargs rm";
    
  2. 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";
    
  3. or download this
    find . -type f -size 0 | xargs rm
    
  4. or download this
    find /home/bob/mytemp -type f -size 0 -exec rm {} \;