Translated message

A translation of this page exists in English.

ファイル名に角括弧 "[]" が含まれるファイルを 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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content