ファイル名に角括弧 "[]" が含まれるファイルを logrotate が削除することができない

Solution In Progress - Updated -

Issue

logrotate の設定ファイルに "rotate 5" と設定しても、ファイル名に角括弧 "[]" が含まれるログファイルを削除することができません。

 messages-[192.168.100.100].log
 messages-[192.168.100.100].log-20160711
 messages-[192.168.100.100].log-20160712
 messages-[192.168.100.100].log-20160713
 messages-[192.168.100.100].log-20160714
 messages-[192.168.100.100].log-20160715
 messages-[192.168.100.100]-20160716

logrotate 設定ファイルの内容は以下の通りです。

/logs/messages*.log {
    copytruncate
    rotate 5
    ifempty
    dateext
    missingok
}

Environment

  • Red Hat Enterprise Linux
    • 5
    • 6
    • 7
  • logrotate

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.