*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Linux man pages -> savelog (8)              



NAME    [Toc]    [Back]

       savelog - save a log file

SYNOPSIS    [Toc]    [Back]

       savelog	[-m  mode] [-u user] [-g group] [-t] [-p] [-c cycle] [-l] file

DESCRIPTION    [Toc]    [Back]

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


       where <number> is the version number, 0 being the newest.  Version numbers
 > 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 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

       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    [Toc]    [Back]

       -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    [Toc]    [Back]

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

Debian GNU/Linux		24 August 1997			    SAVELOG(8)
[ Back ]
 Similar pages
Name OS Title
snapshot IRIX save a portion of the screen in an image file
scrsave IRIX save a part of the screen in an image file
ttdt_Save HP-UX request a ToolTalk client to save a file
DtEditorSaveContentsToFile HP-UX save the contents of a DtEditor widget to a file
SelectSaver IRIX save and restore selected file handle
e2image Linux Save critical ext2 filesystem data to a file
iptables-save Linux Save IP Tables
strdup NetBSD save a copy of a string
strdup FreeBSD save a copy of a string
strdup OpenBSD save a copy of a string
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service