Difference between revisions of "Limit the size of .log files & the journal/ru"

Created page with "* '''delaycompress''' указывает logrotate на сжатие только что ротированного файла в следующем цикле. Это име..."
(Created page with "* '''compress''' очевиден - использовать gzip по умолчанию и добавлять расширение .gz к файлу, в результате...")
Tags: Mobile web edit Mobile edit
(Created page with "* '''delaycompress''' указывает logrotate на сжатие только что ротированного файла в следующем цикле. Это име...")
Tags: Mobile web edit Mobile edit
Line 253: Line 253:
* '''compress''' очевиден - использовать gzip по умолчанию и добавлять расширение .gz к файлу, в результате чего он будет выглядеть следующим образом: <имя_файла>.log.1.gz. Вы можете выбрать другие методы сжатия, я не буду вдаваться в подробности.
* '''compress''' очевиден - использовать gzip по умолчанию и добавлять расширение .gz к файлу, в результате чего он будет выглядеть следующим образом: <имя_файла>.log.1.gz. Вы можете выбрать другие методы сжатия, я не буду вдаваться в подробности.


* '''delaycompress''' tells logrotate to compress the newly rotated file in the next cycle. This has advantages in ease of access & also if the file is still being written to by a process after it has been rotated.
* '''delaycompress''' указывает logrotate на сжатие только что ротированного файла в следующем цикле. Это имеет преимущества в простоте доступа, а также если файл все еще записывается процессом после того, как он был ротирован.


* '''copytruncate''' this is a great option, as it copies the contents of the file to a new new file <file.name>.log.1 & then deletes the contents of the original file. You can have no permission problems crop up when you do it this way.
* '''copytruncate''' this is a great option, as it copies the contents of the file to a new new file <file.name>.log.1 & then deletes the contents of the original file. You can have no permission problems crop up when you do it this way.
translator
10,735

edits