.TH LOGROLL 1 "24 Nov 1993" .BY Zoology .SH NAME logroll \- rename, compress, and save old log files .SH SYNOPSIS .B logroll [ .B \-o ] [ .B \-s suffixes ] [ .B \-i initial ] [ .B \-d deleteat ] [ .B \-c compressat ] [ .B \-n notifier ] [ .B \-w compressor ] [ .B \-z compsuffix ] [ .B \-p ] logfile ... .SH DESCRIPTION .I Logroll administers saving of old log files. By default, for each .IR logfile , it renames .I logfile to .IR logfile .1, .IR logfile .1 to .IR logfile .2, and so forth, up to .IR logfile .9. Files from .IR logfile .3 onward are compressed to save space. Options are: .TP .L -o changes the name sequence for old .IR logfile s to run from .IR logfile .o through .IR logfile .ooo, with the last two compressed. .TP .L -s specifies a list of .IR suffixes , which must be in last-to-first order, with each suffix including any preceding `.'. For example, the suffix list implied by .L -o is ``.ooo\ .oo\ .o'' and the default list is ``.9 .8 .7 .6 .5 .4 .3 .2 .1''. .TP .L -i specifies an .I initial suffix, e.g. .L \-i .0 specifies that the name of the original .I logfile is really .LR logfile.0 . Default is empty. .TP .L -d specifies that files beyond the suffix .I deleteat should be deleted rather than saved. For example, keeping only five old files could be done with .L "-s '.5 .4 .3 .2 .1'" but can be done more tersely with .LR "-d .5" . Default is the last suffix, e.g. ``.9'' for the default suffix list. .TP .L -c specifies that files at and beyond the suffix .I compat should be compressed. Default is ``.3'' for the default suffix list and ``.oo'' for the .L -o list. .TP .L -n specifies that when the original .I logfile is renamed, the command .I notifier should then be run. (The .IR touch (1) command is used first to ensure that a (possibly-empty) new .I logfile exists after the renaming.) This allows signalling long-running processes to re-open the log file, or delaying in hopes that they will terminate. The default is ``sleep\ 5'', a 5-second delay. .TP .L -w specifies the command to be used to do compression. Use of this option will usually require a .L -z option too. The default is ``compress\ \-f''. .TP .L -z specifies the suffix added to the file name by the compression program. The default is ``.Z''. .TP .L -p specifies that no compression is to be done. .SH SEE ALSO compress(1), touch(1) .SH DIAGNOSTICS Terminates immediately with status 1 if a rename, .IR touch , or compression fails. .SH HISTORY Written by Henry Spencer. .SH BUGS The default and .L -o suffix sequences are a bit arbitrary.