file
file命令用来某个文件的类型。
1. $ file index.html
2. index.html: HTML document, ASCII text
file 工具可以对所给的文件一行简短的介绍,它用文件后缀、头部信息和一些其他的线索来判断文件。你在检查一堆你不熟悉的文件时使用 find 非常方便:
1. $ find -exec file {} \;
2. .: directory
3. ./hanoi: Perl script, ASCII text executable
4. ./.hanoi.swp: Vim swap file, version 7.3
5. ./factorial: Perl script, ASCII text executable
6. ./bits.c: C source, ASCII text
7. ./bits: ELF 32-bit LSB executable, Intel 80386, version ...
