Zip and Unzip

praefectus
praefectus used Ask the Experts™
on
How do I tell if I have a zip / unzip program installed?  I have tried to install one, and it has installed (I have NO idea where it installed it) -- is there an easy way to tell?

I have JBoss zipped -- what command to I run to unzip it?  simply? unzip jboss.... .zip?  I always get errors when I do this... ugh.

Any suggestions would be HIGHLY helpful.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Author

Commented:
When I type "unzip zipefile.zip -- I get : unzip: Command not found

Suggestions?
Hi there,

You can download unzip and lots of other handy utilities from http://www.openbsd.org

For example, the x386 files for OpenBSD version 2.7 are located here:

http://www.openbsd.org/2.7_packages/i386.html

What architecture and OS version are you using?

Regards, Nisus
http://www.omnimodo.com
In general when you want to find out what commands you have you use the -locate- command.  In order to make sure your locate database is up to date you enter, as root, the command

/usr/libexec/locate.updatedb

and the disk will whir and thrash, updating this database (that is the thrashing you hear if your cron jobs work as they should, every day at the same time).  

So if you type

locate zip | less

you should get a long list of every file to which you have read permission that contains the string 'zip'.  

In order to tell what packages or ports you have installed you use the command pkg_info with no modifiers.  You will get a list of all the packages (including ports) you have installed.

HTH

Commented:
Hi -  Assuming that you are using OpenBSD, then if you used the "packages" system to install these programmes the executables would normally have been placed in /usr/local/bin.  If you can see them in there but they don't get recognised at the shell prompt, then check your $PATH includes this directory.

The other thing you can try is doing a "pkg_info" - this will list all packages you have installed.

If you are still having problems, re-install the package.  you can do this with the following commands: "pkg_add ftp://ftp.openbsd.org/pub/OpenBSD/3.2/packages/i386/unzip-5.50.tgz" and "pkg_add ftp://ftp.openbsd.org/pub/OpenBSD/3.2/packages.i386/zip-2.3.tgz" (replacing the "3.2" with your OS version, in each case!).
In response to your original question 'How do I tell if I have a zip / unzip program installed'

Use (as root preferably):

find / -name "unzip" -print

Using 'find' rather than 'locate' alleviates the need for rebuilding the locate database, but takes a bit longer to get results.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial