02-26-2008
Gzip can compress only one file at a time because it's a compressor, not a packaging utility. Because of this, if you want to put together many files you have to tar them and then gzip the output tarfile.
So you can:
1) Install and use "zip" utility on your source machine
2) Use tar, gzip and install an appropriate utility on the Windows machine
3) Compress each single file with gzip
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Are there any unix/linux tools that can uncompress the "pkzip" files from DOS env.
Thanks . (2 Replies)
Discussion started by: Wing m. Cheng
2 Replies
2. Shell Programming and Scripting
Hi,
I have a situation where I need to zip files(using pkzip) and send it to vendor, the problem is we are on AIX 5L and when I do man pkzip it does not show anything I assume that it is not installed, but I read some where that it would be istalled but not enabled is it right if yes could... (3 Replies)
Discussion started by: mgirinath
3 Replies
3. Shell Programming and Scripting
Hi,
I would like to invoke "Winzip" utility from a perl script, input the name of zip file and provide output path for unzipped files. Any pointers will be appreciated.
Thanks (5 Replies)
Discussion started by: MobileUser
5 Replies
4. HP-UX
Hi All,
is there any command to unzip the compressed files compressed using PKZIP on HP-UX. We dont have unzip. and gunzip or compress commands are not working. is there any other to do this?
Thank you very much for the help.
Regards,
Srinivas (3 Replies)
Discussion started by: srinivas_paluku
3 Replies
5. UNIX for Dummies Questions & Answers
Dear friends,
I m new to Unix, can anybody please guide me on how to zip and password protect a normal text (or any file) in unix prompt? (1 Reply)
Discussion started by: topgear1000cc
1 Replies
6. UNIX for Dummies Questions & Answers
Hi i am an fresh engineer working in a Embedding company and i am new to linux so any one help me to teach or tell how to open a WinZip file in linux as i use gunzip but hte file suffix is not gz so can any one healp me...
urs
... (2 Replies)
Discussion started by: wagmare
2 Replies
7. Shell Programming and Scripting
hi everyone ,
Can someone provide me a shell program to compress and decompress files using gzip , i dont know anything in shell programming , this code is a part of my project.
So can someone help with me the code ? (2 Replies)
Discussion started by: mig23
2 Replies
8. Shell Programming and Scripting
Hi,
I have .tar file whose size is > 2 GB, when i tries to zip this file sometimes it compresses the file successfully, sometime it fails. How can i ensure that this file compresses successfully always?
One important point i have notice, if file size is > 2GB i am getting this problem, if... (2 Replies)
Discussion started by: shantoshkumar
2 Replies
9. AIX
Attached unzip pkzip bzip for AIX
How to install it
1) download the attachment
2) ftp it to AIX machines in binary mode
ftp it to /tmp/unzip
3) cd /tmp/unzip
4) inutoc .
5) smitty install_all
6) select source as ==> .
7) Select the packages by pressing F4 or ESC+4
8)... (0 Replies)
Discussion started by: filosophizer
0 Replies
10. UNIX for Advanced & Expert Users
Hi All,
I have a random test file: test.txt, size: 146
$ ll test.txt
$ 146 test.txt
Take 1:
$ cat test.txt | gzip > test.txt.gz
$ ll test.txt.gz
$ 124 test.txt.gz
Take 2:
$ gzip test.txt
$ ll test.txt.gz
$ 133 test.txt.gz
As you can see, gzipping a file and piping into gzip... (1 Reply)
Discussion started by: hanfresco
1 Replies
LEARN ABOUT MOJAVE
perlio::gzip
gzip(3) User Contributed Perl Documentation gzip(3)
NAME
PerlIO::gzip - Perl extension to provide a PerlIO layer to gzip/gunzip
SYNOPSIS
use PerlIO::gzip;
open FOO, "<:gzip", "file.gz" or die $!;
print while <FOO>; # And it will be uncompressed...
binmode FOO, ":gzip(none)" # Starts reading deflate stream from here on
DESCRIPTION
PerlIO::gzip provides a PerlIO layer that manipulates files in the format used by the "gzip" program. Compression and Decompression are
implemented, but not together. If you attempt to open a file for reading and writing the open will fail.
EXPORT
PerlIO::gzip exports no subroutines or symbols, just a perl layer "gzip"
LAYER ARGUMENTS
The "gzip" layer takes a comma separated list of arguments. 4 exclusive options choose the header checking mode:
gzip
The default. Expects a standard gzip file header for reading, writes a standard gzip file header.
none
Expects or writes no file header; assumes the file handle is immediately a deflate stream (eg as would be found inside a "zip" file)
auto
Potentially dangerous. If the first two bytes match the "gzip" header "x1fx8b" then a gzip header is assumed (and checked) else a
deflate stream is assumed. No different from gzip on writing.
autopop
Potentially dangerous. If the first two bytes match the "gzip" header "x1fx8b" then a gzip header is assumed (and checked) else the
layer is silently popped. This results in gzip files being transparently decompressed, other files being treated normally. Of course,
this has sides effects such as File::Copy becoming gunzip, and File::Compare comparing the uncompressed contents of files.
In autopop mode Opening a handle for writing (or reading and writing) will cause the gzip layer to automatically be popped.
Optionally you can add this flag:
lazy
For reading, defer header checking until the first read. For writing, don't write a header until the first buffer empty of compressed
data to disk. (and don't write anything at all if no data was written to the handle)
By default, gzip header checking is done before the "open" (or "binmode") returns, so if an error is detected in the gzip header the
"open" or "binmode" will fail. However, this will require reading some data, or writing a header. With lazy set on a file opened for
reading the check is deferred until the first read so the "open" should always succeed, but any problems with the header will cause an
error on read.
open FOO, "<:gzip(lazy)", "file.gz" or die $!; # Dangerous.
while (<FOO>) {
print;
} # Whoa. Bad. You're not distinguishing between errors and EOF.
If you're not careful you won't spot the errors - like the example above you'll think you got end of file.
lazy is ignored if you are in autopop mode.
AUTHOR
Nicholas Clark, <nwc10+perlio-gzip@colon.colondot.net>
SEE ALSO
perl, gzip, rfc 1952 <http://www.ietf.org/rfc/rfc1952.txt> (the gzip file format specification), rfc 1951
<http://www.ietf.org/rfc/rfc1951.txt> (DEFLATE compressed data format specification)
perl v5.18.2 2006-10-01 gzip(3)