bug-tar
[Top][All Lists]
Advanced

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

Re: [Bug-tar] tar and gzip


From: Phillip Susi
Subject: Re: [Bug-tar] tar and gzip
Date: Wed, 15 Mar 2006 16:13:59 -0500
User-agent: Thunderbird 1.5 (Windows/20051201)

address@hidden wrote:
Here is the syntax i am using :
cd (my directory) ; tar -cvf file.tar *.csv | gzip --best > file.tar.gz;
uuencode file.tar.gz file.tar.gz | mailx -s Subject
address@hidden


That is because tar does not produce output for you to pipe to gzip because you have directed it to output to file.tar. Either omit the -f file.tar parameter for tar to output to stdout so you can pipe it, or use the -z switch to ask tar to run gzip for you ( and you might want to change the file name to .tar.gz ).
=> the TAR command works great
=> The mailx command works great also
BUT the GZIP command does not work at all... the gz file created is
empty... so i guess my syntax is wrong.

I have been trying many many different syntaxes.
Sometimes with the pipe, sometimes with the semi-column, etc..

I have also tried the tar option -z (which invokes gzip) : the gz file was
created, it contained my data, but nothing was compressed !!

If you added the -z switch then the file was compressed.
Thank you for helping, since i am about to forget about using gzip...
(fyi, i currently use "compress" which works fine, but does not compress as
much as gzip...)


If you are looking for better compression ratios, you might try bzip2 ( use the -j switch to tar instead of -z). It looks like you don't really want to keep the output file, you just want to mail it. If that is the case then you can just do this:

cd (my directory) ; tar -cj *.csv uuencode | mailx -s Subject address@hidden






reply via email to

[Prev in Thread] Current Thread [Next in Thread]