Re: Piping required files through tar
From: Chris F.A. Johnson (c.fa.johnson_at_rogers.com)
Date: 01/23/04
- Next message: Mubin: "NES Broken Pipe Error"
- Previous message: Doug Freyburger: "Re: Converting compiled to precompiled: Apache2047/48"
- In reply to: Doug Freyburger: "Re: Piping required files through tar"
- Next in thread: Barry Margolin: "Re: Piping required files through tar"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 23 Jan 2004 18:57:29 GMT
On Fri, 23 Jan 2004 at 16:15 GMT, Doug Freyburger wrote:
> Ed wrote:
>>
>> 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
>
> tar tf foo.tar | grep Jan04 | grep "Spools Banks and Logs" | grep 00012234.spl > wow
>
> tar xvf foo.tar ` cat wow `
>
> No need for all of those greps in a row if you're certain of the exact
> path. I just broke it up in case there are a bunch of intervening
> layers of directories.
No need for more than one grep (unless yours is a very old grep):
tar tf foo.tar | grep -e Jan04 -e "Spools Banks and Logs" -e 00012234.spl > wow
--
Chris F.A. Johnson http://cfaj.freeshell.org
===================================================================
My code (if any) in this post is copyright 2004, Chris F.A. Johnson
and may be copied under the terms of the GNU General Public License
- Next message: Mubin: "NES Broken Pipe Error"
- Previous message: Doug Freyburger: "Re: Converting compiled to precompiled: Apache2047/48"
- In reply to: Doug Freyburger: "Re: Piping required files through tar"
- Next in thread: Barry Margolin: "Re: Piping required files through tar"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|