savelog man page on Ubuntu

Man page or keyword search:  
man Server   6591 pages
apropos Keyword Search (all sections)
Output format
Ubuntu logo
[printable version]

SAVELOG(8)							    SAVELOG(8)

NAME
       savelog - save a log file

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

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

	      file.<number><compress_suffix>

       where <number> is the version number, 0 being the newest.  Version num‐
       bers > 0 are compressed unless -l prevents it.  Version number 0 is not
       compressed  because  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 file.2 is moved to
	      version file.3, version file.1 is moved to version  file.2,  and
	      so  on.	Finally version file.0 is moved to version file.1, and
	      version file 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.

OPTIONS
       -m mode
	      chmod the log files to mode, implies -t

       -u user
	      chown log files to user, implies -t

       -g group
	      chgrp log files to group, implies -t

       -c cycle
	      Save cycle versions of the logfile (default: 7). The cycle count
	      must be at least 2.

       -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

       -D dateformat
	      override date format, in the form of [MMDDhhmm[[CC]YY][.ss]]

       -r     use rolldir instead of . to roll files

       -n     do not rotate empty files

       -q     be quiet

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

Debian				  1 May 2009			    SAVELOG(8)
[top]

List of man pages available for Ubuntu

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net