Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - General
User Name
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.


  Search this Thread
Old 04-18-2004, 03:52 PM   #1
American Psycho
Registered: Mar 2004
Location: chroot /dev/hda3
Distribution: LFS
Posts: 88

Rep: Reputation: 15
tar command question

can I unzip all .tar.bz2 files in a certain directory? or would i have to do them one by one? if so, what would be the command?
Old 04-18-2004, 03:54 PM   #2
LQ Guru
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 245Reputation: 245Reputation: 245
tar jxvf *.tar.bz2 would probably work.
Old 04-18-2004, 03:55 PM   #3
Senior Member
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
ops i missread the question

and O trickykid: i dont think that would work, as when i use tar if i specify more then 1 file at a time it gets all confused

Last edited by SciYro; 04-18-2004 at 03:57 PM.
Old 04-18-2004, 09:21 PM   #4
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,905

Rep: Reputation: 353Reputation: 353Reputation: 353Reputation: 353
You could try -C (followed by a space and <directoryname>,or --directory=<directoryname) which should be the first option specified after the word tar, to tell tar the CD to that directory to look for the files, and -f (followed by a space before listing file names) or --file= followed by the file names seperated by semicolon, to tell it which files to work on. Somewhere after -C, list any other options you need. There are few options which must be listed in a particular order. The -f option must be followed by the file name(s) to be operated on. The remaining options can usually be specified anywhere after -C.


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 can i decompress this tar.tar file? hmmm sounds new.. tar.tar.. help ;) kublador Linux - Software 14 10-25-2016 02:48 AM
a tough question 4 u, problem in extracting tar & tar.gz files p_garg Linux - General 5 11-08-2010 11:02 AM
Flag question of Tar command satimis Linux - General 8 06-28-2005 09:59 AM
Tar command question satimis Linux - General 2 05-21-2005 07:05 PM
tar command harisankar Linux - General 2 08-02-2004 12:44 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:04 AM.

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