- 论坛徽章:
- 0
|
不太会用sed命令,请各位大神帮忙要求从logrotate -d命令中,用sed只打印出以下内容:
rotating pattern: /var/log/cron
/var/log/maillog
/var/log/messages
/var/log/secure
/var/log/spooler
weekly (4 rotations)
empty log files are rotated, old logs are removed
logrotate -d输出:
reading config file /etc/logrotate.conf
including /etc/logrotate.d
reading config file cups
reading config info for /var/log/cups/*_log
reading config file dracut
reading config info for /var/log/dracut.log
reading config file httpd
reading config info for /var/log/httpd/*log
reading config file ppp
reading config info for /var/log/ppp/connect-errors
reading config file psacct
reading config info for /var/account/pacct
reading config file samba
reading config info for /var/log/samba/*
olddir is now /var/log/samba/old
reading config file sssd
reading config info for /var/log/sssd/*.log
reading config file subscription-manager
reading config info for /var/log/rhsm/*.log
reading config file syslog
reading config info for /var/log/cron
/var/log/maillog
/var/log/messages
/var/log/secure
/var/log/spooler
reading config file up2date
reading config info for /var/log/up2date
reading config file wpa_supplicant
reading config info for /var/log/wpa_supplicant.log
reading config file yum
reading config info for /var/log/yum.log
reading config info for /var/log/wtmp
reading config info for /var/log/btmp
Handling 14 logs
rotating pattern: /var/log/cups/*_log weekly (4 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/cups/error_log
log does not need rotating
rotating pattern: /var/log/dracut.log yearly (4 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/dracut.log
log does not need rotating
rotating pattern: /var/log/httpd/*log weekly (4 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/httpd/access_log
log does not need rotating
considering log /var/log/httpd/error_log
log does not need rotating
not running postrotate script, since no logs were rotated
rotating pattern: /var/log/ppp/connect-errors after 1 days (5 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/ppp/connect-errors
log /var/log/ppp/connect-errors does not exist -- skipping
rotating pattern: /var/account/pacct after 1 days (31 rotations)
empty log files are not rotated, old logs are removed
considering log /var/account/pacct
log does not need rotating
not running postrotate script, since no logs were rotated
rotating pattern: /var/log/samba/* weekly (4 rotations)
olddir is /var/log/samba/old, empty log files are not rotated, old logs are removed
considering log /var/log/samba/log.127.0.0.1
log does not need rotating
considering log /var/log/samba/log.192.168.220.1
log does not need rotating
considering log /var/log/samba/log.192.168.220.129
log does not need rotating
considering log /var/log/samba/log.myserver
log does not need rotating
considering log /var/log/samba/log.nmbd
log does not need rotating
considering log /var/log/samba/log.rhel65test
log does not need rotating
considering log /var/log/samba/log.senttd01
log does not need rotating
considering log /var/log/samba/log.smbd
log does not need rotating
rotating pattern: /var/log/sssd/*.log weekly (2 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/sssd/*.log
log /var/log/sssd/*.log does not exist -- skipping
not running postrotate script, since no logs were rotated
rotating pattern: /var/log/rhsm/*.log weekly (4 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/rhsm/rhsmcertd.log
log does not need rotating
considering log /var/log/rhsm/rhsm.log
log does not need rotating
rotating pattern: /var/log/cron
/var/log/maillog
/var/log/messages
/var/log/secure
/var/log/spooler
weekly (4 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/cron
log does not need rotating
considering log /var/log/maillog
log does not need rotating
considering log /var/log/messages
log does not need rotating
considering log /var/log/secure
log does not need rotating
considering log /var/log/spooler
log does not need rotating
not running postrotate script, since no logs were rotated
rotating pattern: /var/log/up2date weekly (4 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/up2date
log /var/log/up2date does not exist -- skipping
rotating pattern: /var/log/wpa_supplicant.log 30720 bytes (4 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/wpa_supplicant.log
log does not need rotating
rotating pattern: /var/log/yum.log yearly (4 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/yum.log
log does not need rotating
rotating pattern: /var/log/wtmp monthly (1 rotations)
empty log files are rotated, only log files >= 1048576 bytes are rotated, old logs are removed
considering log /var/log/wtmp
log does not need rotating
rotating pattern: /var/log/btmp monthly (1 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/btmp
log does not need rotating
|
|