file [-m MagicFile] [-f ListFile] [ file ... ]
file [-c] [-m MagicFile]
Description
In the first synopsis form, the file utility determines the type of object for the specified file. The file utility will make a best guess determination of the type. The file type is then written to standard output. If the pathname is determined to be a regular file, file examines the first 1024 bytes to determine the type. By default, the file utility uses the /etc/magic file to help identify files that have defined patterns at specified byte offsets within the object.
In the second synopsis form, the file utility checks the specified MagicFile for format errors.
Options
Operands
Each file is a pathname of a file to be tested.
Exit Status
Related information