Some notes:#!/usr/bin/perl -w use strict; # Always use strict; open(PASSWD, '/etc/passwd') || die "Could not open /etc/passwd: $!\n"; my %where; while (<PASSWD>) { my @linesplit = split /:/; # No need to use $line, # @array1 or @array3 @where{$linesplit[0]} = $linesplit[3]; } close (PASSWD) || die "Error closing file: $!\n"; #Close an opened fil +e! foreach my $i (grep {$where{$_} > 1000} keys %where) { system ("find '/home/u1' -user $i -print > $i"); }
In reply to Re: uid file finder
by Jouke
in thread uid file finder
by muaddib2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |