Apr 24, 2003 #1 Michael42 Programmer Oct 8, 2001 1,454 US How can I send the output of a tar listing to a log file? I tried this and a few variations: tar -tvf /dev/rmt/0 2>> tar.log The results are that it creates a 0 byte file. What can you suggest? Thanks!
How can I send the output of a tar listing to a log file? I tried this and a few variations: tar -tvf /dev/rmt/0 2>> tar.log The results are that it creates a 0 byte file. What can you suggest? Thanks!
Apr 24, 2003 #2 KenCunningham Technical User Mar 20, 2001 8,475 GB You're copying standard error only to your file. Get rid of the 2, ie: tar -tvf /dev/rmt/0 >> tar.log The >> also appends. If you just want to create and overwrite each time use just one > HTH. Upvote 0 Downvote
You're copying standard error only to your file. Get rid of the 2, ie: tar -tvf /dev/rmt/0 >> tar.log The >> also appends. If you just want to create and overwrite each time use just one > HTH.
Apr 24, 2003 Thread starter #3 Michael42 Programmer Oct 8, 2001 1,454 US Ken, thanks your suggestion worked great! Upvote 0 Downvote
Apr 24, 2003 #4 iribach Technical User Oct 12, 2002 211 CH if you collect also error: tar tvf /dev/rmt/0 >> tar.log 2>&1 nota: tar does not care about '-' in options-string Upvote 0 Downvote
if you collect also error: tar tvf /dev/rmt/0 >> tar.log 2>&1 nota: tar does not care about '-' in options-string