Compressed Tar : stop on first occurrence

Mauricio Silveira <[email protected]>
Newsgroups gmane.linux.admin
Message-ID <[email protected]>
Hi all,


I'm wondering if there's any way to get tar to stop immediately after 
the extraction of a file on compressed tar files. eg: I pack a big tgz 
with the file index.txt first so that when I run "tar xf file.tgz 
--occurrence index.txt" it extracts "index.txt" but proceeds reading the 
file. I wish tar stopped after extracting the intended file.

I know it works for non-compressed tar archives....

Any way of achieving this with compressed files... maybe a patch lying 
around the net!?

My distribution is slackware.

Thanks in advance,
Mauricio
msilveira.vcf (text/x-vcard, 321 B)
begin:vcard
fn:Mauricio Silveira
n:Silveira;Mauricio
org;quoted-printable:FSN do Brasil - Consultoria em Inform=C3=A1tica;Software Development / Networking
adr:;;;;;;Brazil
email;internet:[email protected]
title:Linux Consultant / Developer
tel;cell:11-9949-1040
url:http://www.fsndobrasil.com
version:2.1
end:vcard
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.