1755506 Members
3593 Online
108834 Solutions
New Discussion юеВ

Re: 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!!!