Re: leading null characters produced in script...
- From: Robert Hull <Robert@xxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 30 Oct 2006 23:00:50 +0000
On Monday 30 October 2006 20:51, Unruh <unruh-spam@xxxxxxxxxxxxxx> wrote
in comp.os.linux.misc:
Robert Hull <Robert@xxxxxxxxxxxxxxxxxxxxxxxx> writes:
On Monday 30 October 2006 06:54, Avalon1178 <Avalon1178@xxxxxxx> wrote
in comp.os.linux.misc:
I'm trying to write a small script using bash that essentiallyman logrotate
archives logs to prevent logs from getting too big and take up drive
space.
In his case that will not work, since the program writing to the log
file has the file open (via redirection) and two programs writing to a
log file is not a good idea. If logrotate moves the log file to
logfile.1, the program will continue writing to logfile.1 since it is
writing the inode which has not changed.
In order to allow log file rotation, he has to rewrite the program
writing to the log file so that it can allow the log file to be moved.
Since logrotate already has much of the functionality that the OP
appeared to be suggesting (s)he wanted, I thought (s)he might be able
to learn from a program that already does it.
--
Robert HULL
Archival or publication of this article on any part of thisishull.net
is without consent and is in direct breach of the Data Protection Act
.
- Follow-Ups:
- References:
- leading null characters produced in script...
- From: Avalon1178
- Re: leading null characters produced in script...
- From: Robert Hull
- Re: leading null characters produced in script...
- From: Unruh
- leading null characters produced in script...
- Prev by Date: Re: Rsync VS NFS
- Next by Date: Re: MP3/player/USB-stick with unrecognised filesystem
- Previous by thread: Re: leading null characters produced in script...
- Next by thread: Re: leading null characters produced in script...
- Index(es):
Relevant Pages
|