Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Is there a way to untar a file with multiple tars inside? It's suppose to just untar everything inside including untarring the tars inside the tar... With windows it does it, quite annoying I can't figure it out on linux... Here is what I am doing:

# tar -xvf socialengine4.0.5p1.tar 
core-base-4.0.5.tar
core-install-4.0.7.tar
external-autocompleter-4.0.0.tar
external-calendar-4.0.1.tar
external-chootools-4.0.3.tar
external-fancyupload-4.0.1.tar
external-firebug-4.0.0.tar
external-flowplayer-4.0.0.tar
external-moocomet-4.0.0.tar
external-moocrop-4.0.0.tar
external-moolasso-4.0.0.tar
external-mootools-4.0.2.tar
external-mootree-4.0.0.tar
external-open-flash-chart-4.0.0.tar
external-smoothbox-4.0.0.tar
external-swfobject-4.0.0.tar
external-tagger-4.0.2.tar
external-tinymce-4.0.2.tar
library-engine-4.0.5.tar
library-facebook-4.0.0.tar
library-ofc-4.0.0.tar
library-pear-4.0.1.tar
library-scaffold-4.0.3.tar
module-activity-4.0.5p1.tar
module-announcement-4.0.3.tar
module-authorization-4.0.5.tar
module-core-4.0.5.tar
module-fields-4.0.5p1.tar
module-invite-4.0.3.tar
module-messages-4.0.5.tar
module-network-4.0.5p1.tar
module-storage-4.0.4.tar
module-user-4.0.5.tar
widget-rss-4.0.2.tar
widget-weather-4.0.0.tar
changelog.html
[root@D18634 se4]# ls -l
total 36980
-rw-r--r-- 1 1000 1000    27188 Oct  8 15:39 changelog.html
-rw-r--r-- 1 1000 1000   359424 Oct  8 16:13 core-base-4.0.5.tar
-rw-r--r-- 1 1000 1000  1122304 Oct  8 16:13 core-install-4.0.7.tar
-rw-r--r-- 1 1000 1000    38400 Oct  8 16:13 external-autocompleter-4.0.0.tar
-rw-r--r-- 1 1000 1000   100352 Oct  8 16:13 external-calendar-4.0.1.tar
-rw-r--r-- 1 1000 1000    31232 Oct  8 16:13 external-chootools-4.0.3.tar
-rw-r--r-- 1 1000 1000    66560 Oct  8 16:13 external-fancyupload-4.0.1.tar
-rw-r--r-- 1 1000 1000    85504 Oct  8 16:13 external-firebug-4.0.0.tar
-rw-r--r-- 1 1000 1000   216576 Oct  8 16:13 external-flowplayer-4.0.0.tar
-rw-r--r-- 1 1000 1000    11776 Oct  8 16:13 external-moocomet-4.0.0.tar
-rw-r--r-- 1 1000 1000    16384 Oct  8 16:13 external-moocrop-4.0.0.tar
-rw-r--r-- 1 1000 1000    27648 Oct  8 16:13 external-moolasso-4.0.0.tar
-rw-r--r-- 1 1000 1000  1445376 Oct  8 16:13 external-mootools-4.0.2.tar
-rw-r--r-- 1 1000 1000    45568 Oct  8 16:13 external-mootree-4.0.0.tar
-rw-r--r-- 1 1000 1000   330240 Oct  8 16:13 external-open-flash-chart-4.0.0.tar
-rw-r--r-- 1 1000 1000    43008 Oct  8 16:13 external-smoothbox-4.0.0.tar
-rw-r--r-- 1 1000 1000    18432 Oct  8 16:13 external-swfobject-4.0.0.tar
-rw-r--r-- 1 1000 1000    19968 Oct  8 16:13 external-tagger-4.0.2.tar
-rw-r--r-- 1 1000 1000  5711360 Oct  8 16:13 external-tinymce-4.0.2.tar
-rw-r--r-- 1 1000 1000  1230848 Oct  8 16:13 library-engine-4.0.5.tar
-rw-r--r-- 1 1000 1000    28672 Oct  8 16:13 library-facebook-4.0.0.tar
-rw-r--r-- 1 1000 1000   125952 Oct  8 16:13 library-ofc-4.0.0.tar
-rw-r--r-- 1 1000 1000  1715200 Oct  8 16:13 library-pear-4.0.1.tar
-rw-r--r-- 1 1000 1000   340480 Oct  8 16:13 library-scaffold-4.0.3.tar
-rw-r--r-- 1 1000 1000   354304 Oct  8 16:13 module-activity-4.0.5p1.tar
-rw-r--r-- 1 root root   327680 Jan  8 02:37 module-albums-4.0.5.tar
-rw-r--r-- 1 1000 1000    80896 Oct  8 16:13 module-announcement-4.0.3.tar
-rw-r--r-- 1 1000 1000   147456 Oct  8 16:13 module-authorization-4.0.5.tar
-rw-r--r-- 1 1000 1000  2643968 Oct  8 16:13 module-core-4.0.5.tar
-rw-r--r-- 1 root root   665600 Jan  8 02:37 module-events-4.0.5.tar
-rw-r--r-- 1 1000 1000   377344 Oct  8 16:13 module-fields-4.0.5p1.tar
-rw-r--r-- 1 root root   501760 Jan  8 02:37 module-forum-4.0.5p1.tar
-rw-r--r-- 1 1000 1000    81408 Oct  8 16:14 module-invite-4.0.3.tar
-rw-r--r-- 1 1000 1000   147968 Oct  8 16:14 module-messages-4.0.5.tar
-rw-r--r-- 1 1000 1000   111616 Oct  8 16:14 module-network-4.0.5p1.tar
-rw-r--r-- 1 1000 1000    99840 Oct  8 16:14 module-storage-4.0.4.tar
-rw-r--r-- 1 1000 1000   844288 Oct  8 16:14 module-user-4.0.5.tar
-rw-r--r-- 1 root root 18094080 Jan  8 02:40 socialengine4.0.5p1.tar
-rw-r--r-- 1 1000 1000    12288 Oct  8 16:14 widget-rss-4.0.2.tar
-rw-r--r-- 1 1000 1000    13824 Oct  8 16:14 widget-weather-4.0.0.tar
share|improve this question
add comment

1 Answer 1

Unix tar only works on one tar file at a time, so you have to generate a list and untar each one separately. You can try

tar -xvf socialengine4.0.5p1.tar |grep '\.tar$' | xargs -n 1 | tar -xvf

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.