file(1)
NAME
file − determine file type
SYNOPSIS
file [-m mfile] [-c] [-f ffile] file ...
DESCRIPTION
file performs a series of tests on each file in an attempt to classify it. If file appears to be an ASCII file, file examines the first 512 bytes and tries to guess its language. If file is an executable a.out file, file prints the version stamp, provided it is greater than 0 (see the description of the -V option in ld(1)).
file uses the file /etc/magic to identify files that have some sort of magic number, that is, any file containing a numeric or string constant that indicates its type. Commentary at the beginning of /etc/magic explains the format.
Options
file recognizes the following command-line options:
-m mfile use alternate magic file mfile.
-c Check the magic file for format errors. This validation is not normally carried out for reasons of efficiency. No file classification is done when this option is specified.
-f ffile Obtain the list of files to be examined from file ffile. file classifies each file whose name appears in ffile.
SEE ALSO
STANDARDS CONFORMANCE
file: SVID2, XPG2
Hewlett-Packard Company — HP-UX Release 9.0: August 1992