LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 11-27-2001, 10:07 PM   #1
dominique
LQ Newbie
 
Registered: Sep 2001
Distribution: Ubuntu
Posts: 18

Rep: Reputation: 0
Opening .tar.bz2 files


How do you open .tar.bz2 files in the terminal?
 
Old 11-27-2001, 10:27 PM   #2
taz.devil
Senior Member
 
Registered: Nov 2001
Location: Wa. State
Distribution: Slackware
Posts: 1,261

Rep: Reputation: 45
Type this command:

tar -xyvf nameof.tar.bz2

Exact same as a .tar.gz eccept you use the 'y' option to extract using bzip2 instead of the 'z' option for gzip.
 
Old 11-27-2001, 10:42 PM   #3
dominique
LQ Newbie
 
Registered: Sep 2001
Distribution: Ubuntu
Posts: 18

Original Poster
Rep: Reputation: 0
It says: tar: invalid option -- y

I found this thread that says to do: bzip2 -dc archive.tar.bz2 | tar xvf, but when I try that it says: tar: Old option `f' requires an argument.

tar --help doesn't help much:
Code:
  -f, --file=ARCHIVE             use archive file or device ARCHIVE
      --force-local              archive file is local even if has a colon
      --rsh-command=COMMAND      use remote COMMAND instead of rsh
What should I do?
 
Old 11-27-2001, 11:07 PM   #4
paavaka
Member
 
Registered: Jun 2001
Location: Virginia
Distribution: Slackware,Debian,SuSE
Posts: 43

Rep: Reputation: 15
"tar -xjvf file_name.tar.bz2"

Some versions of tar use -y and some use -j. If ever in doubt, just read the 'man' page and look for the flag dealing with bzip2.
 
Old 11-28-2001, 01:14 AM   #5
taz.devil
Senior Member
 
Registered: Nov 2001
Location: Wa. State
Distribution: Slackware
Posts: 1,261

Rep: Reputation: 45
Quote:
Originally posted by dominique
It says: tar: invalid option -- y

I found this thread that says to do: bzip2 -dc archive.tar.bz2 | tar xvf, but when I try that it says: tar: Old option `f' requires an argument.

tar --help doesn't help much:
What should I do?
As below the 'j' option is also a possibility. You may have an older verion of the bzip2 utilities. You can try getting the newest version or yes you can do the bzip2 -dc way, but it's all the same. Look at the manual for bzip2 'man bzip2'. That should help some. But try the z'j'vf option first. Probably just have an older vers.
 
Old 11-28-2001, 03:43 AM   #6
linuxcool
LQ Addict
 
Registered: Jun 2001
Posts: 1,183

Rep: Reputation: 47
Try the command again only this time put a space and a hyphen at the end of the command. Like this:

bzip2 -dc archive.tar.bz2 | tar xvf -
 
Old 11-28-2001, 04:15 PM   #7
dominique
LQ Newbie
 
Registered: Sep 2001
Distribution: Ubuntu
Posts: 18

Original Poster
Rep: Reputation: 0
It worked, thanx everyone!
 
Old 11-30-2001, 03:41 AM   #8
linuxcool
LQ Addict
 
Registered: Jun 2001
Posts: 1,183

Rep: Reputation: 47
You're welcome.
 
  


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
Opening bz2 files and also Samba Wha?Where? Linux - Newbie 4 10-18-2005 07:44 AM
Opening of a tar.bz2 file Gins Linux - General 8 04-08-2005 04:42 PM
installing tar.bz2 files M O L8ingN2dust Mandriva 2 03-26-2005 04:46 AM
How to extract tar.bz2 files? akihandyman Linux - Newbie 3 12-21-2003 04:17 PM
.tar.bz2 files Agileuk Linux - Newbie 7 09-28-2003 01:36 PM


All times are GMT -5. The time now is 11:12 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration