Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

rolling over high-traffic logfiles?



	is there some easy way to roll over high-traffic logfiles
in zsh, without losing any possible incoming data?  i have a machine,
for example, that receives syslog reports from many other machines on
a network, which syslog.conf puts into the file /var/adm/extlog.  for
similar such files, i have a crontab entry that simply copies the log
file to the file "log.`date`", and then copies /dev/null over the current
logfile.  this syslog file, however, is almost constatnly being updated.
in the ideal world, i'd like to not have to worry about one or two
entries getting added (and thus lost) to /var/adm/extlog in the time
between when /var/adm/extlog.`date` is created and /dev/null gets
copied over /var/adm/extlog.  can zsh do some sort of file locking here?
if not, does anyone have any other ideas on how to not lose and log entires?

	tia,
	sweth.

-- 
Sweth Chandramouli
IS Coordinator, The George Washington University
<sweth@xxxxxxx> / (202) 994 - 8521 (V) / (202) 994 - 0458 (F)
<a href="http://astaroth.nit.gwu.edu/~sweth/disc.html";>*</a>



Messages sorted by: Reverse Date, Date, Thread, Author