用法:
file [-i|-L] <file name>
例子:
r@ubt:/$ file /usr/local /usr/local: directory r@ubt:/$ file /bin/nano /bin/nano: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=e87c5ab33de1e9e225244efd8e2a03f55892c98f, stripped r@ubt:/$ file /usr/bin/python /usr/bin/python: symbolic link to python2.7 r@ubt:/$ file -i /usr/bin/python /usr/bin/python: inode/symlink; charset=binary r@ubt:/$ file -iL /usr/bin/python /usr/bin/python: application/x-executable; charset=binary
关于-i,-L开关的作用请自行体会。
原文地址:http://blog.51cto.com/rickqin/2052734