Re: Gnu Tar: Extracting files into a single directory

Sven Mascheck <[email protected]>
Newsgroups gmane.comp.gnu.utils
Organization united xpiloteers
Message-ID <[email protected]>
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
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.