Re: leading null characters produced in script...
- From: Unruh <unruh-spam@xxxxxxxxxxxxxx>
- Date: 31 Oct 2006 06:19:41 GMT
Robert Hull <Robert@xxxxxxxxxxxxxxxxxxxxxxxx> writes:
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.
Certainly if he had a program which would allow its logs to be rotated tehn
logrotate would be the thing to use. However, his program is not of the
form that allow the logs to be rotated since he keeps the file open.
.
- Follow-Ups:
- Re: leading null characters produced in script...
- From: Robert Hull
- Re: leading null characters produced in script...
- 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
- Re: leading null characters produced in script...
- From: Robert Hull
- leading null characters produced in script...
- Prev by Date: Re: Kubuntu 6.10 + Xubuntu 6.10: anyone tried it out?
- Next by Date: Re: Knoppix - ssh connection refused.
- Previous by thread: Re: leading null characters produced in script...
- Next by thread: Re: leading null characters produced in script...
- Index(es):
Relevant Pages
|