LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-05-2011, 04:36 PM   #1
volt220
LQ Newbie
 
Registered: Jan 2011
Posts: 5

Rep: Reputation: 2
untar a list of tar files?


Hi i try to untar a bunch of files located in different folders, with folder deep unkown.

Found an old post about this matter but the suggestion extracts all files in the same folder (your current).
I wan't to extract files to the same folder as the tar file.

The solution from the old post (extracts all files to current folder)
find . -name "*.tar" -exec tar xvf {} \;

The old post:
http://www.linuxquestions.org/questi...-files-380284/
 
Old 01-05-2011, 04:43 PM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Code:
find . -name \*.tar -execdir tar xvf {} \;
Welcome to LinuxQuestions!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to untar all tar-files in a directory? zoomzoom Linux - Newbie 13 05-09-2017 11:52 AM
how to untar files with tar.tar extension johnkalikavunkal Linux - General 5 07-11-2008 05:36 AM
Whats the command to untar files that end in .tar.bz2? BaZiL Linux - Newbie 3 06-20-2007 10:51 AM
untar a list of tar files? Rotwang Linux - General 6 10-10-2006 01:34 PM
Bash script (untar *.tar files and then cd to the untared dir) k0ljat Linux - Newbie 2 12-30-2003 05:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration