Write a subset of a huge tar file to a new tar file without unpacking
I have a huge tar tar t20 archive huge.tar.gz
from which I want to extract a subset and put it in a new tar tar file archive subset.tar.gz
without first extracting the whole huge file. For example, if the content listing is huge.tar.gz
:
tar tfz huge.tar.gz
dir1/bla/bla.bla
dir2/bla/bla.bla
dir3/bla/bla.bla
how can i create a new tar file subset.tar.gz
containing only dir1:
tar tfz subset.tar.gz
dir1/bla/bla.bla
+3
source to share
2 answers