Operating System - HP-UX
1833821 Members
2742 Online
110063 Solutions
New Discussion

Can't log frecover output

 
Christian Poulsen
New Member

Can't log frecover output

Hi

I have tried to log the output when running the frecover command (with -N
option), in order to check which files are recovered.

But no matter what I do the log file stays empty. I have for instance tried the
following:

frecover -r -v -N -f /dev/rmt/0m | tee -a logfile.txt

and

frecover -r -v -N -f /dev/rmt/0m > logfile.txt

Does anyone have an idea how to get this information into the log file?

Thanks in advance

/Christian
2 REPLIES 2
Alan Riggs_1
Regular Advisor

Re: Can't log frecover output

Try redirecting standard error as wel as standard out.
add:
2>&1
to either of the commands you are trying.
Christian Poulsen
New Member

Re: Can't log frecover output

Thanks

That works, for some reason frecover must write its output to standard error
instead of standard output.

I discovered that if I want the standard error output both in a log file and to
the screen, the following command works:

frecover -r -v -N -f /dev/rmt/0m 2>&1 | /bin/tee -a logfile.txt

/Christian