unpacking one single file from archive

Ed Wilts ewilts at ewilts.org
Thu Jan 20 12:43:51 UTC 2005


On Thu, Jan 20, 2005 at 09:30:20AM +0100, Paal Marker wrote:
> Another question is search for a file in a tar.gz archive.  Now I do it 
> in a heavy way in two steps, first make a file I can search in and then 
> make the search: 
> 
> less y.tar.gz  |  cat >  readfile    
> grep -n "x.doc" readfile
> 
> .......and I get the file with full path.
> 
> I believe there is a command for searching directly for a file and path 
> in a tar.gz archive, but wich one is it?

$ tar ztf y.tar.gz | grep x.doc

        .../Ed

-- 
Ed Wilts, RHCE
Mounds View, MN, USA
mailto:ewilts at ewilts.org
Member #1, Red Hat Community Ambassador Program




More information about the redhat-list mailing list