I've got a small problem. I have a daemon which I cannot easily restart
because it is production and people are using it. The daemon is started
with something like:

daemon args >>daemon.log

The file "daemon.log" is getting very huge. The correct way to fix this is
to stop the daemon, "mv" or "rm" the "daemon.log", then restart the
daemon. But I have a vague memory that it is sometimes possible to "reset"
a file to "empty" simply by doing a:

>daemon.log

and that will, at times, work even if the daemon is not restarted. Is my
memory correct? Or is that some sort of "special case" which does not
apply when bash does a >> redirect of stdin?

We plan to fix this by "not doing that!", but instead piping the stdout
from the daemon to a process called "cronolog" which works by
automatically changing the output file at midnight by changing the "date
portion" of the log name.

--
Q: What do theoretical physicists drink beer from?
A: Ein Stein.

Maranatha!
John McKown

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

Reply via email to