Re: Gnu Tar: Extracting files into a single directory

Dubious Dude <[email protected]>
Newsgroups gmane.comp.gnu.utils
Organization Suspicious Bystanders Incorporated (SBI)
Message-ID <[email protected]>
Sven Mascheck wrote:
> Dubious wrote:
> 
>> tar.gz archive. I want to extract them all into a single directory,
>> regardless of their path in the archive.
> 
> $ zcat archive.tar.gz | pax                 
> ./
> ./dir/
> ./dir/subdir/
> ./dir/subdir/b
> ./dir/subdir/a
> ./dir/a
> 
> $ zcat archive.tar.gz | pax -r  -s ',.*/,,p'
> ./ >> 
> ./dir/ >> 
> ./dir/subdir/ >> 
> ./dir/subdir/b >> b
> ./dir/subdir/a >> a
> ./dir/a >> a
> 
> $ ls
> a       b

Thank you, Sven.  I'll keep that in mind for when
pax is available.  I know from the cygwin mailing
list that this is possible, even through it doesn't
come with cygwin itself.
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.