|
|
1.1 root 1: .\" @(#)man/man8/savelog.an 1.2 24 Oct 1990 05:18:46
2: .de pP
3: .if n .sp 1
4: .if t .sp .4
5: ..
6: .de tP
7: .pP
8: .ta \\n(pDu
9: .ti -\\n(pDu
10: ..
11: .TH SAVELOG X_MAN8_EXT_X "31 January 1988" "Local"
12: .SH NAME
13: savelog \- cycle and truncate log files
14: .SH SYNOPSIS
15: .na
16: .B X_UTIL_BIN_DIR_X/savelog
17: [
18: .B \-m
19: .I mode
20: ] [
21: .B \-u
22: .I user
23: ] [
24: .B \-g
25: .I group
26: ] [
27: .B \-c
28: .I cycle
29: ] [
30: .B \-t
31: ] [
32: .B \-l
33: ]
34: .I logfile
35: .br
36: .ad
37: .SH DESCRIPTION
38: The
39: .I savelog
40: command renames and optionally compresses a log file and cycles it
41: through a set of names based on the original log file, removing the
42: last name in the cycle.
43: .SH OPTIONS
44: The
45: .I savelog
46: command accepts the following options:
47: .TP
48: \fB\-m\fP \fImode\fP
49: Change the permissions mode for renamed log files to
50: .IR mode .
51: By default the mode is unchanged.
52: .TP
53: \fB\-u\fP \fIuser\fP
54: Change the owner for renamed log files to
55: .IR user .
56: By default the owner is unchanged.
57: .TP
58: \fB\-g\fP \fIgroup\fP
59: Change the group for renamed log files to
60: .IR group .
61: By default the group is unchanged.
62: .TP
63: \fB\-c\fP \fIcycle\fP
64: Save
65: .I cycle
66: versions of the logfile, where
67: .I cycle
68: is a decimal number. The default value is 7.
69: .TP
70: .B \-l
71: Do not compress log files. By default, a compression program is used,
72: if one is available.
73: .TP
74: .B \-t
75: Ensure that a new logfile exists when the savelog operation is
76: complete. Use of
77: .BR \-m ,
78: .BR \-u
79: or
80: .BR \-g
81: imply this, ensuring that the logfile will have the designated mode.
82: .SH "OPERATION"
83: The given logfile is cycled through files named:
84: .RS
85:
86: OLD/\fIfile\fP.\fInumber\fP
87:
88: .RE
89: where
90: .I file
91: is the basename for the logfile and where
92: .I number
93: ranges from 0 to one less then the
94: .I cycle
95: count specified for the command.
96: The
97: .I OLD
98: dirctory is created, as necessary, and is under the same directory as
99: the logfile itself.
100: .PP
101: This cycle operation is accomplished by renaming the file numbered
102: .IR cycle -2
103: to a file numbered
104: .IR cycle -1
105: and so on until the file numbered 0 is renamed to the file numbered 1.
106: If compression is being used, the first cycle file is compressed after
107: being renamed to cycle 1. After the cycle files are moved through the
108: various names, the filefile itself is moved to the cycle 0 file.
109: This cycle normally occurs once every time
110: .I savelog
111: is executed.
112: If the log file does not exist, savelog ignores it and does
113: not cycle the OLD files.
114: .PP
115: If compression is being used, then compressed log files will have an
116: additional suffix appropriate for the compression program that is
117: used.
118: .SH "SEE ALSO"
119: .IR smail (X_MAN5_EXT_X)
120: and
121: .IR smail (X_MAN8_EXT_X).
122: .SH COPYRIGHT
123: Copyright(C)1987, 1988 Ronald S. Karr and Landon Curt Noll
124: .br
125: See a file COPYING,
126: distributed with the source code,
127: or type
128: .I "smail \-bc"
129: for distribution rights and restrictions
130: associated with this software.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.