Web Hosting Talk







View Full Version : What is the command for zipping files under linux?


wht
07-31-2001, 10:00 AM
I want to download my web.log from the server, but the file is 63MB. I don't want to waste my time and bandwidth in downloading such a big file. Is there any zipping command under linux? Will it substantially reduce the file size after I zip it?

Thanks!

broken
07-31-2001, 10:20 AM
tar -czvf weblog.tar.gz /path/to/web.log

remarkable
07-31-2001, 11:04 AM
gzip /path/to/file.log
then
touch /path/to/file.log

then restart the service

or

cp /path/to/file.log /tmp
gzip /tmp/file.log

then download /tmp/file.log.gz

this way you don't have to restart anything.

BTW, there is no need to tar a single file

Yes.. It will compress a log file as much as 90%

wht
07-31-2001, 12:12 PM
Thanks. I used the 'tar -czvf' command, and the result file is only 6% of the original.

joe52
07-31-2001, 01:27 PM
Originally posted by wht
Thanks. I used the 'tar -czvf' command, and the result file is only 6% of the original.

The beauty of compressing highly repetitive text files.
It almost brings a tear to my eye :bawling:

slade
07-31-2001, 11:41 PM
The z in the tar command given means run gzip on the tar output. Its a way to do it all in one step, instead of tar'ing it then gzip'ing it.

Better to know how to use both commands, but probably more useful to know how to just get it all done.

Pingu
08-03-2001, 05:51 PM
Here's a site that makes it understandble for dummies (like me):
http://www.linuxdot.org/nlm/part1/tar.html

WesternMedia
11-19-2001, 01:53 AM
thanks a LOT for the link pingu. That tutorial makes a LOTTA things clearer for me

ASPCode.net
11-19-2001, 07:28 AM
They just updated their page. The link now is

http://www.linuxdot.org/cgi-bin/nlm.cgi?page=archive