文件操作 - logrotate
返回文件管理
返回主菜单
删除本文件
文件: /etc/cron.daily/logrotate
编辑文件内容
#!/bin/sh # skip in favour of systemd timer if [ -d /run/systemd/system ]; then exit 0 fi # this cronjob persists removals (but not purges) if [ ! -x /usr/sbin/logrotate ]; then exit 0 fi /usr/sbin/logrotate /etc/logrotate.conf EXITVALUE=$? if [ $EXITVALUE != 0 ]; then /usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]" fi exit $EXITVALUE
修改文件时间
将文件时间修改为当前时间的前一年
删除文件