file

作成日 : 2025-04-15
最終更新日 :

役に立つ file

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 を取るスクリプトがある。

まりんきょ学問所UNIX 手習い > file


MARUYAMA Satosi