Operating System - HP-UX
1825693 Members
3295 Online
109686 Solutions
New Discussion

Re: How to compress files.

 
SOLVED
Go to solution
Tom Gore
Regular Advisor

How to compress files.

What can I use to compress or "zip" files? I will be ftp'ing these files to somebody that does *not* have a UNIX system.
11 REPLIES 11
A. Clay Stephenson
Acclaimed Contributor

Re: How to compress files.

The most universal answer is to get the GNU compression utilities. They are available from www.gnu.org and are available for both UNIX and non-unix platforms.

Pkzip is also available for unix platforms.

Clay
If it ain't broke, I can fix that.
Mark Vollmers
Esteemed Contributor

Re: How to compress files.

GNU will compress the files using a .gz extension. If you are ftp'ing the files to windows, for example, Winzip should recongnize that extension and unzip the files. This is the easier way to do it, and it is really easy to zip them in UNIX.

Mark
"We apologize for the inconvience" -God's last message to all creation, from Douglas Adams "So Long and Thanks for all the Fish"
Shannon Petry
Honored Contributor

Re: How to compress files.

Both PK Zip95 or higher, and WinZip 7 and higher can read Unix compress, GNU Zip (gzip), and tar archives.

I usually use this type of archive!

>tar cvf /dest/files.tar ./*
>gzip /dest/files.tar

Knowing this should solve your problems!

Regards,
Shannon
Microsoft. When do you want a virus today?
Ralf Hildebrandt
Valued Contributor

Re: How to compress files.

YOu can use:

compress/uncompress
zip/unzip
gzip/gunzip
bzip2/bunzip2

etc. etc.

Postfix/BIND/Security/IDS/Scanner, you name it...
Vincenzo Restuccia
Honored Contributor

Re: How to compress files.

#tar cvf /path/file.tar ./*
#compress /path/files.tar
#uncompress files.tar.Z
Juan José Muñoz
New Member

Re: How to compress files.

Hi Tom:

An easy way is using compress, winzip work with Z extent, but you need appoint your file with the extent you need in windows before compress
Nobody is perfect (Nobody)
f. halili
Trusted Contributor

Re: How to compress files.

TRy THE FF:

To compress:
# /usr/contrib/bin/gzip yourfile

To uncompress:
# /usr/contrib/bin/gunzip -f yourfile.gz


You may also use the comamnds compress & uncompress


-fnhalili
==============
derekh
Tom Gore
Regular Advisor

Re: How to compress files.

Shannon,
I am part way there. I used:
compress filename. I then ftp'd the file to my PC. When I try to use Winzip (we have v8) it would not work. Winzip help says the file type is not supported.
Mark Vollmers
Esteemed Contributor
Solution

Re: How to compress files.

I don't know about winzip 8.0, but we have 7.0 and it works fine with the .z files. Maybe try doing it with the gzip command and see it if works. Otherwise, try reinstalling winzip; sometimes it loses file extensions and reinstalling it will fix it. Good luck!

Mark
"We apologize for the inconvience" -God's last message to all creation, from Douglas Adams "So Long and Thanks for all the Fish"
f. halili
Trusted Contributor

Re: How to compress files.

try to ist install UWIN in your windoes box.
this will enable do your unix commands like compress, uncompress, gzip, gunzip. So if you ftp from UNIx to windoes you won't have compatibility problems.

http://www.research.att.com/sw/tools/uwin/

so you may now gzip your file, ftp then gunzip from windows to UNIX or UNUX to windows


-fnhalili
derekh
Tom Gore
Regular Advisor

Re: How to compress files.

First, let me say thanks to all. I am trying many of the suggestions (points to follow shortly). I have not had much success with unziping compressed or gzip'd files (so far). Secondly, let me say that I will not be the one unzipping the files. I will be ftp'ing them to a third party who does not have a UNIX system. I know that one of my choices would be to ftp the files to a PC here, use Winzip and then ftp the files to the third party, but I am trying to avoid "touching" the data that many times.