LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-09-2014, 12:51 PM   #1
Jacob9767
LQ Newbie
 
Registered: Sep 2014
Posts: 3

Rep: Reputation: Disabled
Untarring multiple tar files within seperate sub directories


Hi,
I'm wondering how I would go about doing the following say I have a directory /mnt/xyz/2014/09/ and within that are 15 sub folders within them sub folders are a .bz2 file.

How can I automate this to find all bz2 files and unextract them?

Could someone assist with this.

Thankyou.
 
Old 09-10-2014, 06:22 AM   #2
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,763

Rep: Reputation: 926Reputation: 926Reputation: 926Reputation: 926Reputation: 926Reputation: 926Reputation: 926Reputation: 926
If you want them to be extracted "in place"

Code:
find /mnt/xyz/2014/09/ -name "*.bz2" | xargs tar xvf
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
tar files for multiple directories eidbadrlt Linux - Newbie 2 01-17-2012 04:54 AM
[SOLVED] command for tar'ing multiple sub-directories into a single tar file blainemiller Linux - Server 3 04-21-2011 03:05 PM
tar multiple files in different directories... visitnag Linux - Desktop 1 04-14-2008 12:02 AM
Zip multiple directories to seperate archives PlymWS Linux - Software 3 06-16-2007 05:40 AM
Untarring multiple files? chup Linux - General 7 10-16-2003 10:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:34 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