This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl 5.002_01: lib/File/Basename.pm
[perl5.git] / eg / changes
1 #!/usr/bin/perl -P
2
3 # $RCSfile: changes,v $$Revision: 4.1 $$Date: 92/08/07 17:20:08 $
4
5 ($dir, $days) = @ARGV;
6 $dir = '/' if $dir eq '';
7 $days = '14' if $days eq '';
8
9 # Masscomps do things differently from Suns
10
11 #if defined(mc300) || defined(mc500) || defined(mc700)
12 open(Find, "find $dir -mtime -$days -print |") ||
13         die "changes: can't run find";
14 #else
15 open(Find, "find $dir \\( -fstype nfs -prune \\) -o -mtime -$days -ls |") ||
16         die "changes: can't run find";
17 #endif
18
19 while (<Find>) {
20
21 #if defined(mc300) || defined(mc500) || defined(mc700)
22     $x = `/bin/ls -ild $_`;
23     $_ = $x;
24     ($inode,$perm,$links,$owner,$group,$size,$month,$day,$time,$name)
25       = split(' ');
26 #else
27     ($inode,$blocks,$perm,$links,$owner,$group,$size,$month,$day,$time,$name)
28       = split(' ');
29 #endif
30
31     printf("%10s%3s %-8s %-8s%9s %3s %2s %s\n",
32             $perm,$links,$owner,$group,$size,$month,$day,$name);
33 }
34