1834391 Members
1975 Online
110066 Solutions
New Discussion

Re: gzip question

 
navin
Super Advisor

gzip question

hello again,
is it possible to gzip and gunzip directories..
in hpux
thanks
Learning ...
6 REPLIES 6
VVS
Regular Advisor

Re: gzip question

Yes it is possible.
If you create archive file of the directory using tar command then apply gzip command.

It's same for gunzip also. once done, extract the directory using tar command.

Regards,

VVS
Work is life, you know, and without it, there's nothing but fear and insecurity.
Steven Schweda
Honored Contributor

Re: gzip question

Strictly speaking, no. Gzip works on one
file. However, you can use "tar" (or "pax")
to create that one file, and that is what is
generally done.

A Forum search for keywords like:
tar pipeline
should find many examples (of things to do
and things not to do).
Ganesan R
Honored Contributor

Re: gzip question

Hi,

If you want to zip directories you should go for zip/unzip utilies which is available for HPUX.

you can gzip/gunzip all files under a directory. All the files will gzipped with the extension of .gz
Best wishes,

Ganesh.
Asif Sharif
Honored Contributor

Re: gzip question

Hi navin,

You can either use tar or gzip.

=========
Commands
=========
#tar -cvf .tar
#gzip -r

For detail see the man pages of "gzip".


Regards,
Asif Sharif
Regards,
Asif Sharif
Steven Schweda
Honored Contributor

Re: gzip question

> If you want to zip directories you should
> go for zip/unzip [...]

That probably depends on why you're doing
this, as already explained elsewhere:

http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1275221

> #tar -cvf .tar

That uses gzip how, exactly?

> #gzip -r

This may make sense, depending on what you
actually mean by "gzip and gunzip
directories". An unambiguous description of
what you're trying to do might be helpful
here.
James R. Ferguson
Acclaimed Contributor

Re: gzip question

Hi Navin:

Your previous question related to this subject, and the answers provided to it should give you the anwser to this question:

http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1275221

Regards!

...JRF...