daily pastebin goal
84%
SHARE
TWEET

Untitled

a guest Aug 10th, 2018 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/perl -w
  2.  
  3. use File::stat;
  4. ($#ARGV == 0) or die "Podaj katalog: \n";
  5. (-d $ARGV[0]) or die "To nie jest katalog! \n";
  6.  
  7.         opendir($dh, $ARGV[0]);
  8.         @zawartosc = readdir $dh;
  9.         closedir($dh);
  10.  
  11.         foreach $plik (@zawartosc)
  12.         {
  13.                 my $info    = (stat($plik))[2];
  14.         #       my $Mode = $info->mode;
  15.                 $Mode = $Mode & 0777;
  16.                 if($plik =~ m/[A-Z]+/ && -d -X $plik && ($Mode & 050) == 050) {
  17.                         print $plik . "\n";
  18.                 }
  19.         }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top