plucky (8) savelog.8.gz

Provided by: debianutils_5.21_amd64 bug

名前

       savelog - ログファイルの保存

書式

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

説明

       savelog コマンドは、古いファイルのコピーを保存し、オプションで圧縮を行います。file の古いバージョンは、以
       下のように名前がつきます。

              file.<number><compress_suffix>

       <number>  は版番号です。0  が最も新しくなります。版番号が > 0 の場合、-l を指定して抑制しない限り圧縮しま
       す。版番号 0 は、プロセスがまだ I/O のために開いている可能性があるため、圧縮しません。ファイルを cycle 版
       までしか保存しません。

       ファイルがまだ存在せず、-t を与えられると、ファイルを生成します。

       ファイルが存在し、ファイルの長さが 0 バイトより大きい場合、以下のアクションを実行します。

       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)     -m, -u, -g, -t, -p の各フラグが与えられた場合、そのフラグに該当する空の file を生成します。-p フラ
              グの場合、以前と同じ所有者、グループ、パーミッションで生成します。

       5)     The new file.0 is changed subject to the -m, -u, and -g flags.

オプション

       -m mode
              ログファイルを mode に chmod します。-t を暗示します。

       -u user
              ログファイルを user に chown します。-t を暗示します。

       -g group
              ログファイルを group に chgrp します。-t を暗示します。

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

       -t     新しいログファイルを生成するよう touch します。

       -l     ログファイルを圧縮しません (デフォルト: 圧縮する)

       -p     ログファイルの所有者、グループ、パーミッションを保持します。

       -j     gzip に代えて bzip2 で圧縮

       -J     gzip に代えて xz で圧縮

              For xz no strength option is set, and xz decides on the default  based  on  the  total  amount  of
              physical  RAM.   Note  that  xz  can  use a very large amount of memory for the higher compression
              levels.

       -1 .. -9
              圧縮強度やメモリー使用量 (デフォルト: 9、xz 除く)

       -C     強制的な循環ログファイルの一掃

       -d     循環に標準日を使用します。

       -D dateformat
              override date format, in the syntax understood by the date(1)  command

       -r     use rolldir instead of . to roll files

       -n     空ファイルを回転しない

       -q     静かに

バグ

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

関連項目

       logrotate(8)

翻訳

       倉澤 望 <nabetaro@debian.or.jp>, 2012
       Debian JP Documentation ML <debian-doc@debian.or.jp>