I have a large tar file I split
. Is it possible to cat
and untar the file using pipeline.
Something like:
cat largefile.tgz.aa largefile.tgz.ab | tar -xz
instead of:
cat largefile.tgz.aa largfile.tgz.ab > largefile.tgz tar -xzf largefile.tgz
I have been looking around and I can't find the answer. I wanted to see if it was possible.
To extract (unzip) a tar. gz file simply right-click on the file you want to extract and select “Extract”. Windows users will need a tool named 7zip to extract tar.
Simply right-click the item you want to compress, mouseover compress, and choose tar. gz. You can also right-click a tar. gz file, mouseover extract, and select an option to unpack the archive.
Use -
as the input file:
cat largefile.tgz.aa largefile.tgz.ab | tar zxf -
Make sure you cat them in the same order they were split.
If you're using zsh you can use the multios feature and avoid invoking cat:
< largefile.tgz.aa < largefile.tgz.ab tar zxf -
Or if they are in alphabetical order:
<largefile.tgz.* | tar zxf -
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With