Home
Main website
Display Sidebar
Hide Ads
Recent Changes
View Source:
savelog(8)
Edit
PageHistory
Diff
Info
LikePages
SAVELOG !!!SAVELOG NAME SYNOPSIS DESCRIPTION OPTIONS BUGS ---- !!NAME savelog - save a log file !!SYNOPSIS __savelog__ [[-m mode] [[-u user] [[-g group] [[-t] [[-p] [[-c cycle] [[-l] file ... !!DESCRIPTION The __savelog__ command saves and optionally compresses old copies of files. Older versions of ''file'' are named: ''file''.'''' where '''' is the version number, 0 being the newest. Version numbers ''-l__ prevents it. Version number 0 is not compressed becase a process might still have ''file'' opened for I/O. Only ''cycle'' versions of the file are kept. If the file does not exist and __-t__ was given, it will be created. For files that do exist and have lengths greater than zero, the following actions are performed: 1) Version numbered files are cycled. Version ''cycle''-2 is moved to version ''cycle''-1, version ''cycle''-3 is moved to version ''cycle''-2 , and so on. Finally version 0 is moved to version 1, and version ''cycle'' is deleted. Both compressed names and uncompressed names are cycled, regardless of __-l__. Missing version files are ignored. 2) The new ''file.1'' is compressed unless the __-l__ flag was given. It is changed subject to the __-m__, __-u__, and __-g__ flags. 3) The main file is moved to ''file.0''. 4) If the __-m__, __-u__, __-g__, __-t__, or __-p__ flags are given, then an empty ''file'' is created subject to the given flags. With the __-p__ flag, the file is created with the same owner, group, and permissions as before. 5) The new ''file.0'' is changed subject to the __-m__, __-u__, and __-g__ flags. Since the version numbers start with 0, version number ''cycle'' is never formed. The ''cycle'' count must be at least 2. !!OPTIONS __-m mode__ chmod the log files to mode __-u user__ chown log files to user __-g group__ chgrp log files to group __-c cycle__ Save cycle versions of the logfile (default: 7) __-t__ touch new logfile into existence __-l__ don't compress any log files (default: do compress) __-p__ preserve owner, group, and permissions of logfile !!BUGS If a process is still writing to ''file.0'', and savelog moves it to ''file.1'' and compresses it, data could be lost. ----
3 pages link to
savelog(8)
:
Man8s
sysklogd(8)
syslogd-listfiles(8)
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.