man logroll () - rename, compress, and save old log files

NAME

logroll - rename, compress, and save old log files

SYNOPSIS

logroll [ -o ] [ -s suffixes ] [ -i initial ] [ -d deleteat ] [ -c compressat ] [ -n notifier ] [ -w compressor ] [ -z compsuffix ] [ -p ] logfile ...

DESCRIPTION

Logroll administers saving of old log files. By default, for each logfile, it renames logfile to logfile.1, logfile.1 to logfile.2, and so forth, up to logfile.9. Files from logfile.3 onward are compressed to save space. Options are:

changes the name sequence for old logfiles to run from logfile.o through logfile.ooo, with the last two compressed.
specifies a list of suffixes, which must be in last-to-first order, with each suffix including any preceding `.'. For example, the suffix list implied by is ``.ooo .oo .o'' and the default list is ``.9 .8 .7 .6 .5 .4 .3 .2 .1''.
specifies an initial suffix, e.g. specifies that the name of the original logfile is really Default is empty.
specifies that files beyond the suffix deleteat should be deleted rather than saved. For example, keeping only five old files could be done with but can be done more tersely with Default is the last suffix, e.g. ``.9'' for the default suffix list.
specifies that files at and beyond the suffix compat should be compressed. Default is ``.3'' for the default suffix list and ``.oo'' for the list.
specifies that when the original logfile is renamed, the command notifier should then be run. (The touch(1) command is used first to ensure that a (possibly-empty) new 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.
specifies the command to be used to do compression. Use of this option will usually require a option too. The default is ``compress -f''.
specifies the suffix added to the file name by the compression program. The default is ``.Z''.
specifies that no compression is to be done.

SEE ALSO

DIAGNOSTICS

Terminates immediately with status 1 if a rename, touch, or compression fails.

HISTORY

Written by Henry Spencer.

BUGS

The default and suffix sequences are a bit arbitrary.