Operating System - HP-UX
1823153 Members
3813 Online
109647 Solutions
New Discussion юеВ

Re: compressing/zipping or uncompressing/unzipping files on hpux

 
SOLVED
Go to solution
Shivkumar
Super Advisor

compressing/zipping or uncompressing/unzipping files on hpux

Dear Sirs,

What are the various commands available for compressing/zipping or unzipping/uncompressing
the files ?

Which one of them can be used for compressing or uncomprssing directories also ?

Thanks,
Shiv
14 REPLIES 14
James R. Ferguson
Acclaimed Contributor
Solution

Re: compressing/zipping or uncompressing/unzipping files on hpux

Hi Shiv:

To compress and uncompress you can use 'compress(1)' or 'gzip'. See their manpages for more information. Another open source utility is 'bzip'.

As for compressig and uncompressing directories, you are really operating on all the files within the directory. The aforementioned utilities will do this too. Again, the manpages are your best friend!

Regards!

...JRF...
Joseph Loo
Honored Contributor

Re: compressing/zipping or uncompressing/unzipping files on hpux

hi shiv,

do not think that gzip was by default pre-install. if u require gzip:

http://hpux.connect.org.uk/hppd/hpux/Gnu/gzip-1.3.5/

as for compress, james is right to mention "man compress" for more info.

regards.
what you do not see does not mean you should not believe
Arunvijai_4
Honored Contributor

Re: compressing/zipping or uncompressing/unzipping files on hpux

Hi Shiv,

You can use gzip which comes with HP-UX by default, Location : /usr/contrib/bin/gzip

Uncompressing, You can use gunzip or gzip -d
Location : /usr/contrib/bin/gunzip

Or, you can use jar -xvf to unzip files.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Shameer.V.A
Respected Contributor

Re: compressing/zipping or uncompressing/unzipping files on hpux

Hi Shiv,

You can use gzip, gunzip, zcat utilities to perform compress & expanding operations on hp ux. Please see the man pages for the same.

shameer
.... See invisible, feel intangible and achieve impossible as everything is possible ....
Yogeeraj_1
Honored Contributor

Re: compressing/zipping or uncompressing/unzipping files on hpux

hi shiv,

concerning gzip, note that you will need to patch to the gzip 1.2.4 for it to support files greater than 4GB.

However, gzip cannot compress several files into a single archive directly! You will first have to create a tar file then compress it:
for GNU tar: gtar cvzf file.tar.gz filenames
for any tar: tar cvf - filenames | gzip > file.tar.gz

Alternatively, you can use zip, PowerArchiver 6.1, 7-zip or Winzip. The zip format allows random access to any file in the archive, but the tar.gz format usually gives a better compression ratio.

hope this helps too!

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Shivkumar
Super Advisor

Re: compressing/zipping or uncompressing/unzipping files on hpux

is winzip available on hpux ?
Joseph Loo
Honored Contributor

Re: compressing/zipping or uncompressing/unzipping files on hpux

hi shiv,

winzip as its first 3 letters imply is for windows only.

regards.
what you do not see does not mean you should not believe
Arunvijai_4
Honored Contributor

Re: compressing/zipping or uncompressing/unzipping files on hpux

Hello Shiv, for unzipping .zip files, you can use jar utility which is part of Java SDK on HP-UX.

# /opt/java1.4/bin/jar -xvf

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Yogeeraj_1
Honored Contributor

Re: compressing/zipping or uncompressing/unzipping files on hpux

hi again,

sorry for the confusion. winzip is for windows environments only.

You may try zip from http://www.info-zip.org/pub/infozip/

Also know as Info-ZIP, its purpose is to provide free, portable, high-quality versions of the Zip and UnZip compressor-archiver utilities that are compatible with the DOS-based PKZIP by PKWARE, Inc.

hope this helps too!

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Arunvijai_4
Honored Contributor

Re: compressing/zipping or uncompressing/unzipping files on hpux

Shiv, Also you can use Unzip utility http://hpux.connect.org.uk/hppd/hpux/Misc/unzip-5.52/

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Hemanth Gurunath Basrur
Honored Contributor

Re: compressing/zipping or uncompressing/unzipping files on hpux

Hi Shivkumar,

Refer http://docs.hp.com/en/B2355-60127/compress.1.html

Regards,
Hemanth
Raj D.
Honored Contributor

Re: compressing/zipping or uncompressing/unzipping files on hpux

Hi Shiv ,

Here it is : All the compressing tools for hp-ux

1. compress
2. gzip
3. jar
4. zcat
5. zip
http://hpux.cs.utah.edu/hppd/hpux/Misc/zip-2.31/


To Uncompress:
1: uncompress
2. gunzip
3. jar
4. zcat
5. unzip
http://hpux.cs.utah.edu/hppd/hpux/Misc/unzip-5.52/

For further details , check the man page.
Extensively used are gzip , compress . zip/unzip used to dealing with zip based file , dos/win.

cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Raj D.
Honored Contributor

Re: compressing/zipping or uncompressing/unzipping files on hpux

Hi Shiv,

Also a final thought,

You can use tar/pax/cpio etc , before using the compression tool, it will archived the files and then compress the file into a single file.

Ex:
# cd /mydir
# tar -cvf mydir.tar *
# gzip mydir.tar mydir.tar.gz

To uncompress:
------------
# cd dest_dir
## copy the source file mydir.tar.gz to dest_dir

# gunzip mydir.tar.gz
# tar -xvf mydir.tar

And you are done.

Hope this will help,

cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Arturo Galbiati
Esteemed Contributor

Re: compressing/zipping or uncompressing/unzipping files on hpux

Hi,
you can use compress/uncompress, native HP-UX commands, or zip/unzip, gzip as thisr part tools.
HTH,
Art