1834534 Members
2968 Online
110069 Solutions
New Discussion

compressing files

 
SOLVED
Go to solution
Waqar Razi
Regular Advisor

compressing files

How can we compress files?
6 REPLIES 6
Pete Randall
Outstanding Contributor

Re: compressing files

Have a look at the man page for compress.


Pete

Pete
Ernesto Cappello
Trusted Contributor
Solution

Re: compressing files

Hi Wagar, you can you gzip or compress commands. The most used is gzip.

For further information use man gzip.

This is the command used by me:

#gzip -9 filename

with -9 you have the best compress but the slowest compression method. The default compression level is -6.

Best regards.
Ernesto
Dennis Handly
Acclaimed Contributor

Re: compressing files

As mentioned by Pete, there is compress(1) and uncompress(1). And by Ernesto, there is gzip and gunzip, in /usr/contrib/bin/. This is much better than simple compress.
You could also download zip/unzip.
Steven Schweda
Honored Contributor

Re: compressing files

> How can we compress files?

I use file compression programs, like gzip,
bzip2, and Zip.

Which files? Why?

Individual files, or whole directory trees,
or what?

The best way to do what you want may depend
on exactly what you would like to do, and my
psychic powers are too weak to tell me that.

bzip2 often compresses better (and more
slowly) than gzip. Zip may be more
convenient if you're sending the files to a
non-UNIX system.
Arturo Galbiati
Esteemed Contributor

Re: compressing files

HI,
If you don't have access to an zipping utility, (or if you want install it) you can use the jar command, included in included "bin" directory of the Java, as long as it is reachable from your executable path.
jar -? for the option

HTH,
Art
Jeeshan
Honored Contributor

Re: compressing files

Either you can use compress or gzip command. for parameters, see the man pages

#man compress

#man gzip
a warrior never quits