Operating System - HP-UX
1748256 Members
3637 Online
108760 Solutions
New Discussion юеВ

Re: Tee output not showing up in file

 
SOLVED
Go to solution
Mike Smith_33
Super Advisor

Tee output not showing up in file

Quick question: I am running a recovery from tape and I want to output everything that is being recovered. I used the following command

frecover тАУf /dev/rmt/0m тАУr тАУv | tee /var/tmp/recovery.log

About a million files get restored with output to the screen yet the recovery.log file is empty. Man says that frecover normally operates silently so the -v is what I used to get it to display to the screen. Is that the issue? Any help is appreciated.
4 REPLIES 4
James R. Ferguson
Acclaimed Contributor
Solution

Re: Tee output not showing up in file

Hi Mike:

# frecover ├в f /dev/rmt/0m ├в r ├в v 2>&1 | tee /var/tmp/recovery.log

That is, capture STDERR to your log.

Regards!

...JRF...
Tim Nelson
Honored Contributor

Re: Tee output not showing up in file

as noted.. most of frecovers output is not STDOUT, it is STDERR

2>my.log

or

>my.log 2>&1


Mike Smith_33
Super Advisor

Re: Tee output not showing up in file

I thought it had something to do with that, I just wasn't sure. I have the solution currently running.
Dennis Handly
Acclaimed Contributor

Re: Tee output not showing up in file

You may want to consider never using tee.
Instead redirect the output to a file and background the job.
Then you can tail -f the file, then kill it, when you are bored. Then restart it later.