[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cobalt-users] Re: tar not compressing?



On Monday 23 February 2004 05:40 pm, FantasticMoms.com wrote:
> I just noticed tarring my log files doesn't seem to make them smaller.

They won't get smaller if you're just making an archive (copy) of them...

> I just tarred web.log by using the following :
>
> tar cvfp /home/sites/site4/logs/weblog.tar /home/sites/site4/logs/web.log
>
> and the resulting listing showed :
>
> -rw-r--r--    1 root     site4    12748800 Feb 23 18:49 weblog.tar
> -rw-r--r--    1 root     site4    12744014 Feb 23 05:07 web.log
>
> So the tar is actually a little bit bigger.  What am I doing wrong?

You forgot the "z" option to gzip:

	tar czvpf /home/sites/site4/logs/weblog.tar /home/sites/site4/logs/web.log

'man tar' is your friend... :)