LinuxQuestions.org
Review your favorite Linux distribution.
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 08-27-2009, 04:12 AM   #1
thomas2004ch
Member
 
Registered: Aug 2009
Posts: 502

Rep: Reputation: 31
What is the difference between using "jar xvf" and "unzip" to unzip the zip-file?


see title.
 
Old 08-27-2009, 04:26 AM   #2
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957
jar extracts java archives (*.jar) whereas unzip un-compresses *.zip files.
 
Old 08-27-2009, 04:56 AM   #3
thomas2004ch
Member
 
Registered: Aug 2009
Posts: 502

Original Poster
Rep: Reputation: 31
But as try to install the jboss I see from the jboss document that one should use the "jar xvf" to unzip the downloaded file as follow:
Code:
"jar xvf jboss-eap-4.3.0.zip"
Why?
 
Old 08-27-2009, 05:17 AM   #4
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957
Posted by mistake. Sorry.

Last edited by colucix; 08-27-2009 at 06:25 AM.
 
Old 08-27-2009, 06:11 AM   #5
irabinovitch
LQ Newbie
 
Registered: Sep 2003
Location: Los Angeles, CA
Distribution: Ubuntu, Debian
Posts: 13

Rep: Reputation: 1
Quote:
Originally Posted by thomas2004ch View Post
But as try to install the jboss I see from the jboss document that one should use the "jar xvf" to unzip the downloaded file as follow:
Code:
"jar xvf jboss-eap-4.3.0.zip"
Why?
JAR files are essentially ZIP files in the java world. The only real difference are some additional meta data which is stored as normal files in the archive (ie MANIFEST files, optional digital signatures, etc), specific file pathing/structure, and the obvious difference in file extension. The unzip and jar xvf command are therefore very similar and will generally be interchangeable commands in terms of results when executing them against a zip or jar file.

I say generally because some unzip implementations, especially on windows, have been known to have bugs with dealing with file name capitalization which could result in issues when trying to make use of the files extracted for the JAR. There are also some small differences between how the too commands handle the modify time setting on extracted files. These differences can 99% of the time these are close enough. I regularly see both users and admins use the commands interchangeably.
 
  


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
how can I "cat" or "grep" a file to ignore lines starting with "#" ??? callagga Linux - Newbie 7 08-16-2013 07:58 AM
newbie question: whats the difference between "su root", "su" and "su -&quo mojarron Slackware 9 12-07-2009 05:08 PM
Can you explain the difference between "Free Software (GNU)" and "Open Source"? vharishankar General 5 03-03-2005 10:40 AM
difference between "Web server local URL" and "IPv4 address"? kpachopoulos Linux - General 2 09-17-2004 02:30 PM
Where to "unzip" tar files? alaskazimm Linux - Software 5 05-01-2004 12:55 AM


All times are GMT -5. The time now is 07:52 PM.

Main Menu
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