To pull the folder from the tarball to another tar archive?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
5 views
There tar.gz the archive created by the command tar-cpzf ...that is gzip compressed and with a reservation of rights. For example, the following folder structure:
earth

moon

sun



Is it possible with one command to create an archive with the same parameters, containing only one of the folders? For example, to the structure only contains one folder:
moon


With a single command. That is, without resorting to manual unpack, and then pack it to the desired folder.
by | 5 views

1 Answer

0 like 0 dislike
tar-cpzf new.tar.gz --include="moon" @old.tar.gz
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
asked Apr 9, 2019 by HovardRork
0 like 0 dislike
5 answers
asked Mar 25, 2019 by koef
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
asked Apr 9, 2019 by zzmaster
110,608 questions
257,186 answers
0 comments
27,978 users