Igor Khromov blog

Unzip / extract *.jar / *.war file

Sometimes we need to extract *.jar / *.war file content to check what we have in the archive and there a very easy way to do that with unzip command line util in terminal on Mac, Linux:

unzip [file-name].jar -d [folder-name-to-unzip-to]
unzip [file-name].war -d [folder-name-to-unzip-to]

Install unzip on Mac

If you do not have unzip installed on your Mac, you can install it with brew:

brew install unzip

Don’t have brew installed, just follow instructions on the official website: install homebrew.

Install unzip on CentOS

sudo yum install unzip

Install unzip on Ubuntu

sudo apt-get install -y unzip