E
emannion
Hi,
I have a script that finds files like this:
find(\&finds, $dir);
sub finds {
return unless -f;
if ( $_ =~ /^core./ ){
@ls = `ls -l $File::Find::name`;
fail("Core file $_ found in: $File::Find::dir ", "MEDIUM");
print PX_HEALTH_REPORT "@ls \n";
$flag = 1;
}
}
This works fine but the error output from find gets printed to the
screen like this:
Can't cd to (/var/spool/) mqueue : The file access permissions do not
allow the specified action.
Can't cd to (/var/spool/cron/) crontabs : The file access permissions
do not allow the specified action.
Can't cd to (/var/spool/cron/) atjobs : The file access permissions do
not allow the specified action.
Can't cd to (/var/adm/) SRC : The file access permissions do not allow
the specified action.
Can't cd to (/var/adm/) cron : The file access permissions do not
allow the specified action.
Can someone tell me how to redirect this output somewhere else. I
still want some output to be printed to the screen so a change in the
code for this function would be helpful.
All help appreciated
Enda
I have a script that finds files like this:
find(\&finds, $dir);
sub finds {
return unless -f;
if ( $_ =~ /^core./ ){
@ls = `ls -l $File::Find::name`;
fail("Core file $_ found in: $File::Find::dir ", "MEDIUM");
print PX_HEALTH_REPORT "@ls \n";
$flag = 1;
}
}
This works fine but the error output from find gets printed to the
screen like this:
Can't cd to (/var/spool/) mqueue : The file access permissions do not
allow the specified action.
Can't cd to (/var/spool/cron/) crontabs : The file access permissions
do not allow the specified action.
Can't cd to (/var/spool/cron/) atjobs : The file access permissions do
not allow the specified action.
Can't cd to (/var/adm/) SRC : The file access permissions do not allow
the specified action.
Can't cd to (/var/adm/) cron : The file access permissions do not
allow the specified action.
Can someone tell me how to redirect this output somewhere else. I
still want some output to be printed to the screen so a change in the
code for this function would be helpful.
All help appreciated
Enda