file(1) file(1)
NAME [Toc] [Back]
file - determine file type
SYNOPSIS [Toc] [Back]
file [-m mfile] [-c] [-f ffile] [-h] file ...
DESCRIPTION [Toc] [Back]
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 [Toc] [Back]
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.
-h Do not follow symbolic links.
EXTERNAL INFLUENCES [Toc] [Back]
Environment Variables
LC_MESSAGES determines the language in which messages are displayed.
If LC_MESSAGES is not specified in the environment or is set to the
empty string, the value of LANG is used as a default for each
unspecified or empty variable. If LANG is not specified or is set to
the empty string, a default of "C" (see lang(5)) is used instead of
LANG.
If any internationalization variable contains an invalid setting, file
behaves as if all internationalization variables are set to "C". See
environ(5).
International Code Set Support [Toc] [Back]
Single- and multi-byte character code sets are supported. However,
all non-ASCII text files are identified as "data".
Hewlett-Packard Company - 1 - HP-UX 11i Version 2: August 2003
file(1) file(1)
WARNINGS [Toc] [Back]
The file command for a release interprets the core files for that
particular release correctly. Using the file command on a core file
generated on a different release will report incorrect results.
SEE ALSO [Toc] [Back]
ld(1).
STANDARDS CONFORMANCE [Toc] [Back]
file: SVID2, SVID3, XPG2, XPG4
Hewlett-Packard Company - 2 - HP-UX 11i Version 2: August 2003 [ Back ] |