How can I remove the leading path from a tar and retar it in memory?
Posted
by Michael Hale
on Super User
See other posts from Super User
or by Michael Hale
Published on 2010-03-15T05:32:14Z
Indexed on
2010/03/15
5:39 UTC
Read the original article
Hit count: 360
tar
I was thinking I could do something like this:
wget -O- http://example.com/funky.tar.gz | \
tar --strip-components 1 -Ox | tar -cf fixed.tar.gz
to remove the leading path from all items in the downloaded tar, but it appears that there is no way to create a tar from stdin. Please prove me wrong.
© Super User or respective owner