translator
10,713
edits
(Created page with "По сути, он выполняет эту команду:") |
(Created page with "=== Эффект от ежедневного запуска /etc/logrotate.d/rotate.logs ===") Tags: Mobile web edit Mobile edit |
||
Line 351: | Line 351: | ||
Это означает что все скрипты, находящиеся внутри '''/etc/logrotate.d''', также будут запущены. | Это означает что все скрипты, находящиеся внутри '''/etc/logrotate.d''', также будут запущены. | ||
Это подводит нас ко второму шагу (выше), где мы создали '''/etc/logrotate.d/rotate.logs'''. Этот скрипт будет выполняться каждый день. Комментарии, которые я добавил к файлу rotate.logs, дают общее представление о том, что он делает. Вы можете удалять, изменять и дополнять этот скрипт, но делайте это с осторожностью. | |||
=== | === Эффект от ежедневного запуска /etc/logrotate.d/rotate.logs === | ||
Is that any file in /var/log that had '''log''' at the end of its name will be processed by the commands in the '''rotate.logs''' script. This will back up these files to a new file '''<name>.log.1''' & empty the original file to size 0. Any previous copies with '''<name>.log.<number>''' will have their numbers bumped up one, until the day when they would have been given an 8, that is the day that they are deleted. | Is that any file in /var/log that had '''log''' at the end of its name will be processed by the commands in the '''rotate.logs''' script. This will back up these files to a new file '''<name>.log.1''' & empty the original file to size 0. Any previous copies with '''<name>.log.<number>''' will have their numbers bumped up one, until the day when they would have been given an 8, that is the day that they are deleted. |