RHEL 8 以降で grep が UTF-8 以外のエンコーディングのテキストファイルに対して "binary file matches" を出力する
Issue
- RHEL 8 以降では、UTF-8 以外のエンコーディング (SJIS など) のテキストファイルが、
grepによってバイナリーファイルとして扱われます。 -
RHEL 8
grepは、一部のファイル (たとえば RHEL 7grepではテキストファイルとして扱われていた/etc/udev/hwdb.binなど) をバイナリーファイルとして検出します。$ grep LANG /etc/udev/hwdb.bin grep: /etc/udev/hwdb.bin: binary file matches
Environment
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
- grep
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.