Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

tar tvf, redirect output to file.

Status
Not open for further replies.

AdamCoombs

Technical User
May 22, 2002
51
0
0
GB
hi there,

I tar one (large) file to tape every night. I then come in in the morning, rewind the tape and do a quick tar tvf /dev/rmt/0 to make sure its there.
i want to put the output of "tar tvf /dev/rmt/0" to a file so i can mail it to myself so i dont have to check it every morning. Trouble is, if i do a > logfile it just hangs..
i have tried the stdin stderr, that didn't work..

any ideas how to get this output redirected to a file?

cheers
Adam
 
Have you tried 2>&1 logfile to redirect standard output and standard error to the logfile?
 
yup...just get a empty file!

ps: thanks for the reply....
 
Odd. The simple > works on my machines. An alternative is:

tar tvf /dev/rmt/0 | tee logfile

You say that you have to rewind the tape each morning - I assume you're doing the same before trying to write the logfile from it?
 
yup...
leaving out the "n" when doing it manually!

i will try with the | tee logfile, see what happens..

cheers mate..
Adam
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top