file(1)
NAME
file − determine file type
SYNOPSIS
file [−m mfile] [−c] [−f ffile] arg ...
DESCRIPTION
file performs a series of tests on each argument in an attempt to classify it. If an argument appears to be ASCII, file examines the first 512 bytes and tries to guess its language. If an argument is an executable a.out file, file will print 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 its format.
The −m option instructs file to use an alternate magic file.
The −c flag causes file to check the magic file for format errors. This validation is not normally carried out for reasons of efficiency. No file classification is done under −c.
−fffile specifies that ffile is a file containing a list of the files which are to be examined. file then classifies each file whose name appears in ffile.
SEE ALSO
STANDARDS CONFORMANCE
file: SVID2, XPG2
Hewlett-Packard Company — HP-UX Release 8.05: June 1991