Re: Piping required files through tar

From: Barry Margolin (barmar_at_alum.mit.edu)
Date: 01/22/04


Date: Thu, 22 Jan 2004 15:17:24 GMT

In article <dc34c090.0401220647.d207f42@posting.google.com>,
 jedbeer@hotmail.com (Ed) wrote:

> Possibly not the best explaination but here goes ....
>
>
> for example
>
> I have a tar file containing a dir called Jan04
>
> In that dir are sub dirs called Spools Bank and Logs
>
> I want to extract a file called 00012234.spl from Spool without
> extracting the whole dir structure
>
> I'm sure it can be done , in fact I've seen it done at my last job

GNU tar has a --to-stdout option, which writes the contents of the
file(s) being extracted to stdout rather than to the directory
structure. You can then redirect or pipe the output to wherever you
want.

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***


Relevant Pages

  • Re: Piping required files through tar
    ... > I have a tar file containing a dir called Jan04 ... > In that dir are sub dirs called Spools Bank and Logs ... Some tars have a flag to strip a path from the output filenames (Eg on ... Another approach is to use pax to extract the archive, ...
    (comp.unix.admin)
  • Re: Piping required files through tar
    ... > I have a tar file containing a dir called Jan04 ... > In that dir are sub dirs called Spools Bank and Logs ... > I want to extract a file called 00012234.spl from Spool without ...
    (comp.unix.admin)
  • Re: Piping required files through tar
    ... >> I have a tar file containing a dir called Jan04 ... >> In that dir are sub dirs called Spools Bank and Logs ... >> I want to extract a file called 00012234.spl from Spool without ...
    (comp.unix.admin)
  • Piping required files through tar
    ... I have a tar file containing a dir called Jan04 ... In that dir are sub dirs called Spools Bank and Logs ... I want to extract a file called 00012234.spl from Spool without ...
    (comp.unix.admin)
  • Re: The argument for fs assistance in handling archives
    ... |>Suppose I've got a tar file with an index attached. ... |>have to figure out exactly which ones I need before I extract them ... | This doesn't justify bloating the kernel. ... | Are you saying install it on demand the first time it's run? ...
    (Linux-Kernel)