[plug] appending files
Leon Brooks
leon at brooks.fdns.net
Sun Sep 22 00:51:56 WST 2002
On Sat, 21 Sep 2002 12:37, Arie Hol wrote:
> At 02:22 PM 20-09-2002 +0800, you wrote:
>> So - you can go ;
>> $ cat *.log.gz > biglog.gz
>> ...rather than ;
>> $ gunzip *.log.gz
>> $ cat *.log | gzip > biglog.gz
> Excuse my ignorance on this one - but wouldn't it be better to use '>>'
> instead of '>' to cat the two files together, I have the impression that
> using '>' will overwrite the target and cause a subsequent loss of its
> contents.
Yes. Note that the target is not among the sources here, so > is probably
appropriate. >> would also work (identically if biglog.gz didn't already
exist) but if biglog.gz already exists and contains part of the data now
being concatenated, you will wind up with multiple copies of the data.
Cheers; Leon
More information about the plug
mailing list