1827889 Members
1679 Online
109969 Solutions
New Discussion

gzip question

 
SOLVED
Go to solution
Bawitdaba
Frequent Advisor

gzip question

Hi!
I know that with gzip it's possible to compress a file which can be later descompress by Winzip in a PC.
The problem is that it only possible with one file at the same time.
Someone knows if there is "something" to compress several files, getting an only one "package" which could be used later in a PC?

i mean, do the same in Unix as the Winzip does.
thanks a lot
14 REPLIES 14
Arturo Perez del Galleg
Frequent Advisor
Solution

Re: gzip question

You can to use:
1.- tar
2.- gzip
The first command can use multiple files with low compression. The second command compress the file obtained.
Bawitdaba
Frequent Advisor

Re: gzip question

But tar is not understood in Windows
Vincent Farrugia
Honored Contributor

Re: gzip question

Hello,

Sure you can.

First create a tar archive with the files you want using tar cvf /dev/rmt/#m /directory, where #m is the tape device file and /directory is the directory you want the files to be archived in. Then, compress the tarred file using gzip.

HTH,
Vince
Tape Drives RULE!!!
Vincent Farrugia
Honored Contributor

Re: gzip question

Hello,

Tar can be opened in Windows using Winzip as well.

HTH,
Vince
Tape Drives RULE!!!
T G Manikandan
Honored Contributor

Re: gzip question

you can use

#tar -cvf a.tar /xxx
#gzip a.tar

which will result in a.tar.gz

transfer it to a PC use the winzip to extract
harry d brown jr
Honored Contributor

Re: gzip question

To extract .tar and .tar.gz files on Windows 9x/NT/2000/ME/XP use PowerArchiver 6.1 (freeware) or Winzip (commercial). For tar on MSDOS or other systems, see the FAQ of the comp.compression newsgroup.

http://www.gzip.org/

http://www.sfsu.edu/ftp/win/utils/

http://www.winzip.com

http://www.faqs.org/faqs/compression-faq/part1/section-2.html


live free or die
harry
Live Free or Die
Tom Jackson
Valued Contributor

Re: gzip question

Try this...

cd some_dir
tar -cf - ./some_sub_dir | gzip - > some_sub_dir.tgz

In the command above, you are doing a tar on a sub dir that can have several files and sub dirs, then piping the output to gzip to compress it. Finally, you are writing your output to a .tgz file. Now transfer the file to your PC. Your windows zip program should be able to read it, decompress it and un-tar it.

hth,

Tom
Bawitdaba
Frequent Advisor

Re: gzip question

i'm trying some test but i don't get it.
I get descompress the file with Winzip but then it's not readable.

???
Vincent Farrugia
Honored Contributor

Re: gzip question

Hello,

Winzip should identify that a tar archive is present, and opens it accordingly. If not, you might have an old version of Winzip. Download the newest version from http://www.winzip.com .

HTH,
Vince
Tape Drives RULE!!!
Bawitdaba
Frequent Advisor

Re: gzip question

how can i untar it???

thanks
Bawitdaba
Frequent Advisor

Re: gzip question

ok, i'll do

thanks a lot
harry d brown jr
Honored Contributor

Re: gzip question

Go read the links I provided.


live free or die
harry
Live Free or Die
H.Merijn Brand (procura
Honored Contributor

Re: gzip question

Power Archiver on windows (http://www.powerarchiver.com/ ) recognizes not only tar, but also gzipped tar (.tgz and .tar.gz) and bzip2ed tar (.tar.bz, .tar.bz2, .tbz)

bzip2 has an even higher compression grade than gzip, especially for text files

Both gzip and bzip2 have standalone binaries available for windows.

Zip files can also be generated directly on HP-UX, either directly with 'zip' (http://www.info-zip.org/pub/infozip/ ) or through perl, using the Compress::Zlib module with Archive::Zip, both available from CPAN, but by default included in the perl available on my homepage for ITRC https://www.beepz.com/personal/merijn/ . The compression programs gzip and bzip2 are also available there. HTH
Enjoy, Have FUN! H.Merijn
Kelli Ward
Trusted Contributor

Re: gzip question

Hi Mercedes,
winzip 8 should work just fine for you. I use winzip 7 currently at work and have no problems.

Another option, if your interested in file sharing, is Samba. (not for compression or archiving)

It allows an nfs style file sharing and print serving (between Windows, Linux, Unix, etc.) and is fairly easy to configure.

HP - called CIFS (stable and a free download at software.hp.com)

It is available for many platforms from samba.org, also free, but I have had corruption issues from some mirror sites. (Specifically, us4)

Good luck,
Kel
The more I learn, the more I realize how much more I have to learn. Isn't it GREAT!