LinuxQuestions.org
Help answer threads with 0 replies.
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 08-23-2003, 10:39 AM   #1
sikandar
Member
 
Registered: Aug 2003
Distribution: Linux AS & RH 9
Posts: 255

Rep: Reputation: 30
bz and gz


What is the difference between bz and gz. I downloaded files with these extenstion .tar.bz2 or .tar.gz etc.

How to unzip/untar both of these?
 
Old 08-23-2003, 10:43 AM   #2
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
.tar.gz = tar xvzf filename.tar.gz

.tar.bz2 = tar xvjf filename.tar.bz2

Bzip2 compressed files tend to be smaller, which is nice if you are on a slow connection. If you've got the bzip2 app installed, you should look for those as often as possible.

HTH

Cool
 
Old 08-23-2003, 10:50 AM   #3
sikandar
Member
 
Registered: Aug 2003
Distribution: Linux AS & RH 9
Posts: 255

Original Poster
Rep: Reputation: 30
So its mean both are tar files. and to untar bz2 I will have to give the following command,

tar -xjf filename.tar.bz2

Secondly I want to know that why we use "-" before xjf?
 
Old 08-23-2003, 10:53 AM   #4
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
You don't have to. It's a delimiter, or option, to the tar command. When giving options to applications, in linux, it's supplied as -options. This is likely to decipher between another command and options to the aforementioned command.

But with tar, you don't have to:
tar xvjf
will work just as:
tar -xvjf
does.

Both are tarballs that are further compressed with either gzip compression or bzip2.

Cool
 
Old 08-23-2003, 12:54 PM   #5
Thetargos
Senior Member
 
Registered: Mar 2003
Location: Mexico City
Distribution: Fedora, Ubuntu & Mint
Posts: 1,679

Rep: Reputation: 45
To extend the MasterC comment on the subject:

the dash (-) is used more as a convention and for compatibility with other UNIXes and is the standard of POSIX OS's. On the other hand GNU supports long options as in --help (preceded with a double dash)

Cheers!
 
  


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




All times are GMT -5. The time now is 04:39 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration