Piping output of tar(1) into another tar(1) command

Mark Ovens mark at ukug.uk.freebsd.org
Mon Nov 20 17:58:44 GMT 2006

Pete French wrote:
>> I have a massive Gzip'd tar archive that I need to put onto tape (DAT) 
>> as I need the disk space. I don't have enough disk space to extract the 
>> archive to a temporary location in order to archive it to tape therefore 
>> I need to do it directly by piping the output of the archive extraction 
>> to the tar(1) command to write it to tape.
> If the gile is already in tar format why dont you just write it to the
> tape directly with dd ? If youy dont want the tape version to be compressed
> then run it though gzip along the way.
> i.e. dd if=myfile.tar.gz of=/dev/st0 bs=8192
> (whatever the approrpiate device and block size parameters are for your tape)

D'oh! of course, I should have worked that one out for myself.

Thanks for the quick reply.



More information about the Ukfreebsd mailing list