💻 Software
How can I remove the leading path from a tar and retar it in memory?
Fresh5 days ago
Mar 15, 202611843 viewsConfidence Score0%
0%
Problem
I was thinking I could do something like this: 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.
Error Output
wget -O- http://example.com/funky.tar.gz | \ tar --strip-components 1 -Ox | tar -cf fixed.tar.gz
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Canonical Fix
Unverified Fix
New Fix – Awaiting Verification
Fix for: How can I remove the leading path from a tar and retar it in memory?
Low Risk
You most certainly can create a tar from stdin. Use as the source, and pipe whatever you want to tar into it. http://ss64.com/bash/tar.html http://www.google.com/search?q=tar+stdin
Awaiting Verification
Be the first to verify this fix
Sign in to verify this fix