TRIMLOG(8L) Misc. Reference Manual Pages TRIMLOG(8L) NAME trimlog - trim system log files SYNOPSIS trimlog DESCRIPTION Trimlog is used to trim system log files to keep them from growing without bound. When invoked, it reads commands from the file %CONFIG% which tell it which files to trim, how to trim them, and by how much they should be trimmed. The %CONFIG% file may contain any of the following commands: truncate filename n Truncate the named file to a length of no more than n bytes. This has the effect of removing all but the first n bytes of the file. This command is useful for zeroing log files. trimbylines filename n Trim the named file to a length of no more than n lines. The last n lines will be copied to the front of the file, and the rest of the file truncated. This command is useful for deleting old entries from textual log files such as those maintained by syslog(8). trimbybytes filename n Trim the named file to a length of no more than n bytes. The last n bytes will be copied to the front of the file, and the rest of the file truncated. This command is useful for deleting old entries from binary log files such as /usr/adm/wtmp. sendsig filename signo Send the signal number signo (see sigvec(2)) to the process id contained in filename . This can be used to tell processes which use signals for notification, such as syslogd(8) or gated(8), to stop writing to their log file while trimlog is working on it. Lines which begin with a sharp sign (`#') in the log file are treated as comments. BUGS Trimming log files of some commands while they are running may result in ``holes'' being left in the log file. There is no provision to signal the commands to close their log files and reopen them. AUTHOR David A. Curry, Research Institute for Advanced Computer 21 August 1990 Last change: SRI 1 TRIMLOG(8L) Misc. Reference Manual Pages TRIMLOG(8L) Science 21 August 1990 Last change: SRI 2