Merge tarballs

cat 1.tar.gz 2.tar.gz > 3.tar.gz; tar zxvfi 3.tar.gz
Requires the GNU tar ignore zeros option. http://www.gnu.org/software/tar/manual/html_section/Blocking.html
Sample Output
[email protected] tartest$ tar cvfz 1.tar.gz 1/
1/
1/1
[email protected] tartest$ tar cvfz 2.tar.gz 2/
2/
2/2
[email protected] tartest$ ls -l
total 16
drwxrwxr-x 2 hendry hendry 4096 May  5 15:21 1
-rw-rw-r-- 1 hendry hendry  134 May  5 15:21 1.tar.gz
drwxrwxr-x 2 hendry hendry 4096 May  5 15:21 2
-rw-rw-r-- 1 hendry hendry  137 May  5 15:22 2.tar.gz
[email protected] tartest$ rm -rf 1 2
[email protected] tartest$ ls -l
total 8
-rw-rw-r-- 1 hendry hendry 134 May  5 15:21 1.tar.gz
-rw-rw-r-- 1 hendry hendry 137 May  5 15:22 2.tar.gz
[email protected] tartest$ cat 1.tar.gz 2.tar.gz > 3.tar.gz
[email protected] tartest$ tar zxvfi 3.tar.gz 
1/
1/1
2/
2/2

6
By: hendry
2010-05-05 14:27:47

1 Alternatives + Submit Alt

What Others Think

Hi there! Thanks for sharing this. I was facing the issue and I could not find proper solution that I found a knockout post to complete my thesis work. But after reading this post I have come to know how one can Copy files to a remote host with SFTP with a leading dot.
MaryKlein · 36 weeks and 3 days ago
Continuing with instruction is profitable for every individual. It helps an individual in learning new aptitudes and limits. Learning new capacities would reliably be in the upside of a person. Visit online fixer to get more about writing. It is in like manner indispensable for boosting your business.
anonymous11 · 9 weeks and 2 days ago
Truly, I never knew about Reiki in my life previously. At that point out of nowhere I got pulled in to it as a result of your site. Once visit https://www.essaycheckerfree.com/essay-grammar-check-app-or-editing-essays-on-your-own/ for more guidance. The consequences of this method are stunning.
anonymous11 · 9 weeks and 2 days ago
There were insufficient huge stars partaking in the Qatar ExxonMobil Open. I often visit comma splice checker free for more guidance. In any case, it was amazingly agreeable and engaging for all audience members.
anonymous11 · 9 weeks and 2 days ago
By watching these photographs, I can say that you are putting an amazing energy in Austin. I often visit this website to read more details about writing. Preferably, after this visit, you would consider something new.
anonymous00 · 4 weeks and 4 days ago
The University of Tampa is medium-sized and isn't unnecessarily well known. Check this http://www.sentencecorrection.org/free-sentence-checker/ to get more knowledge. In any case, I was unable to envision anything better than to pick is as my learning association.
anonymous00 · 4 weeks and 4 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: