View Single Post

   
  #3 (permalink)  
Old 01-19-2008, 06:11 AM
saf
 
Posts: n/a
Default Re: How can I get usual screen output in piped tar command?

voipfc wrote:
> I am piping the output from tar to directly to gpg for encryption
> using the command below
>
> tar cf - --index-file verbose_output.txt --ignore-failed-read -P --
> preserve --show-omitted-dirs \ --exclude-from exclude.lst / | gpg -e
> -r backup@key.domain.com > encrypted.tar.gpg
>
> I also want the list of files which is normally displayed on the
> screen to be saved into a file for later viewing.
>
> I gather it relates to the way stderr and stdout are handled. I assume
> that stdout is what is sent to gpg so where can stderr be piped to.


Use the "v" argument in tar:
tar cvf - --index-file verbose_output.txt --ignore-failed-read -P --
preserve --show-omitted-dirs \ --exclude-from exclude.lst / | gpg -e
-r backup@key.domain.com > encrypted.tar.gpg

--
saf
E-Mail protected against spam: ihnnsfbg@smtp2.trashmail.net
Reply With Quote