I need to move 3TB of data to a new SAN. I have to make sure that I
have the correct tights to move the data so I want to test my data
before the move. I want to walk the data and see if I have access to
all the files. I am not sure how to test the files to see if I have
access or not. I don't need to know what access I need to know if
anyone took my group out. I can still stat a file but how can I test
for write access without writing to a file. Here is what I have
use File::DirWalk;
my $dw = new File::DirWalk;
$dw->onFile(sub {
my ($file) = @_;
if(length($file) < 1)
{
print " #####!!!### ------> Paused File =
$file\n";
$pause = <STDIN>;
}
print $file . "\n";
return File::DirWalk::SUCCESS;
});
my($walkPath) = @ARGV;
chomp($walkPath);
$dw->walk($walkPath);
I used a length comparison to see if files that I don't have access too
returns a length. Any Ideas?
Thanks
-T