Re: Compressed Tar : stop on first occurrence

"Hendrik Visage" <[email protected]>
Newsgroups gmane.linux.admin
Message-ID <[email protected]>
On 10/20/06, Mauricio Silveira <[email protected]> wrote:
> 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....

Perhaps try something like:
gzcat filename.tgz | tar .... and see if that "works", else the issue
is the piping effect
of the gzip/bzip2 for tar.

>
> Any way of achieving this with compressed files... maybe a patch lying
> around the net!?
>
> My distribution is slackware.
>
> Thanks in advance,
> Mauricio
>
>
>


-- 
Hendrik Visage
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
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.