in reply to How to get filesystem ownerships
#!/usr/bin/perl -w use strict; $| =1; my $path = 'C:\temp'; my @lines = `"dir /Q $path"`; foreach my $line (@lines) { next unless $line =~ m|^\d+/\d+|; my ($owner, $file) = ($line =~ /\\(\w+)\s+(.*)$/)[0,1]; print "$owner\t $file\n"; } __END__ prints: Marshall trace.pl Marshall trace.txt Marshall transpose.pl Marshall transpose1.pl ...etc...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to get filesystem ownerships
by Anonymous Monk on Apr 22, 2010 at 18:40 UTC | |
by Marshall (Canon) on Apr 22, 2010 at 20:56 UTC | |
by Anonymous Monk on Apr 24, 2010 at 17:28 UTC | |
by JSchmitz (Canon) on May 13, 2010 at 17:19 UTC |