Napsal (») 20. 3. 2007 v kategorii man linux, přečteno: 1146×


savelog - save a log file

savelog [-m mode] [-u user] [-g group] [-t] [-p] [-c cycle] [-l] [-j]
[-C] [-d] [-l] [-r rolldir] [-n] [-q] file ...


The savelog command saves and optionally compresses old copies of
files. Older versions of file are named:


where is the version number, 0 being the newest. Version num-
bers > 0 are compressed unless -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 follow-
ing actions are performed:

1) Version numbered files are cycled. Version cycle-2 is moved to
version cycle-3, version cycle-1 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

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.

-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

-j compress with bzip2 instead of gzip

-C force cleanup of cycled logfiles

-d use standard date for rolling

-r use rolldir instead of . to roll files

-n do not rotate empty files

-q be quiet

If a process is still writing to file.0, and savelog moves it to file.1
and compresses it, data could be lost.

Debian 12 April 2003 SAVELOG(8)
Hodnocení:     nejlepší   1 2 3 4 5   odpad


Článek ještě nebyl okomentován.

Nový komentář

Notif. e-mail *:
[*1*] [*2*] [*3*] [*4*] [*5*] [*6*] [*7*] [*8*] [*9*] [*10*] [*11*] [*12*] [*13*] [*14*] [*15*] [*16*] [*17*] [*18*] [*19*] [*20*] [*21*] [*22*] [*23*] [*24*] [*25*] [*26*] [*27*] [*28*] [*29*] [*30*] [*31*] [*32*] [*33*] [*34*] [*35*] [*36*] [*37*] [*38*] [*39*] [*40*] [*41*] [*42*] [*43*] [*44*] [*45*] [*46*] [*47*] [*48*] [*49*] [*50*]   [b] [obr]
Odpovězte prosím číslicemi: Součet čísel jedenáct a sedm