Redirecting stdout from tar to a text file.
Hello all this is my first post ever. *woohoo*. Anyhow I have been looking on the net to find a way to capture the stdout messages of tar when i extract a tar file. I tried this...
Code:
tar -xvf foo.tar &1 > ./install_info/foo.txt Any ideas? Thanx in advance. Heath |
Re: Redirecting stdout from tar to a text file.
Quote:
Secondly, the "1 >" construction won't work, you can't put a space between 1 and >, bash won't recognise this as you trying to redirect file descriptor 1 (stdout). Try 1> foo.txt or just > foot.txt (since > file is the same as 1> file) tar xvf somefile.tar > foo.txt will work the way you expect. |
Wow. That was fast and very helpful. Thanks.
|
All times are GMT -5. The time now is 08:33 PM. |