Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 

27 rader
615 B

  1. #!/usr/bin/env perl
  2. #
  3. # Because all find implementations, that is, everything but gnu find.
  4. # lack -find as an option.
  5. #
  6. use File::Find;
  7. my $debug;
  8. (exists($ENV{"DEBUG"})) ? $debug++ : undef;
  9. my $dir = $ARGV[-1] || '/tmp';
  10. find(\&sieve, $dir);
  11. sub sieve {
  12. my $file = $File::Find::name;
  13. my $filedir = $File::Find::dir;
  14. my ($dev,$inode,undef,undef,undef,undef,undef,$size) = lstat($file);
  15. next if !(-d $file); # Only zie diectories BITTE!
  16. #
  17. # Ok, lets see if readdir returns more than 2 entries.
  18. opendir my $H, $file or next;
  19. print "$file\n" unless (grep !/^\.{1,2}/, readdir $H);
  20. close $H;
  21. };