The file command is used to display information for specified files, such as whether the specified file is a directory, symbolic link, or a specific file such as plain text or an executable file.
Usage:
file [-i|-l] <file name>
Example:
[Email protected]:/$ file/usr/local/usr/local:directory[email protected]:/$ file/bin/nano/bin/nano:elf 64-bit LSB exe Cutable, x86-64, version 1 (SYSV), dynamically linked, interpreter/lib64/ld-linux-x86-64.so.2, for Gnu/linux 2.6.32, Buil did[sha1]=e87c5ab33de1e9e225244efd8e2a03f55892c98f, Stripped[email protected]:/$ file/usr/bin/python/usr/bin/ Python:symbolic link to python2.7[email protected]:/$ file-i/usr/bin/python/usr/bin/python:inode/symlink; Charset=binary[email protected]:/$ file-il/usr/bin/python/usr/bin/python:application/x-executable; Charset=binary
For the function of the-i,-l switch, please feel it.
Ubuntu Command series: file-identifying information for a specified file