LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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, 03:12 AM   #1
thomas2004ch
Member
 
Registered: Aug 2009
Posts: 539

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


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

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

Original Poster
Rep: Reputation: 33
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, 04:17 AM   #4
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

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

Last edited by colucix; 08-27-2009 at 05:25 AM.
 
Old 08-27-2009, 05: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



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 06:58 AM
newbie question: whats the difference between "su root", "su" and "su -&quo mojarron Slackware 9 12-07-2009 04:08 PM
Can you explain the difference between "Free Software (GNU)" and "Open Source"? vharishankar General 5 03-03-2005 09:40 AM
difference between "Web server local URL" and "IPv4 address"? kpachopoulos Linux - General 2 09-17-2004 01:30 PM
Where to "unzip" tar files? alaskazimm Linux - Software 5 04-30-2004 11:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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