[root@canary-12-06 temp]# file ~/.bashrc
/root/.bashrc: ASCII text
[root@canary-12-06 temp]# file /usr/bin/passwd
/usr/bin/passwd: setuid ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped
通过这个命令,可以简单的判断这个文件的格式