file は、ファイルの構造を知るのに役立つコマンドである。
$ file *.eo appendix1.html.eo: HTML document, Unicode text, UTF-8 (with BOM) text appendix2.html.eo: HTML document, Unicode text, UTF-8 (with BOM) text chap01.html.eo: HTML document, Unicode text, UTF-8 text chap02.html.eo: HTML document, Unicode text, UTF-8 text chap03.html.eo: HTML document, Unicode text, UTF-8 text (以下略)
ここで、BOM とは Byte Ordered Mark の略で、Unicode のテキストに付くことがある、バイト順を表す符号である。 Perl で作った、BOM を取るスクリプトがある。