Do not follow symbolic links.
Check the magic ®le for format errors. This validation is not normally carried out for reasons of ef®ciency. No ®le classi®cation is done when this option is speci®ed.
Use alternate magic ®le m®le.

f

®le(1)

®le(1)

NAME

®le - determine ®le type

SYNOPSIS

file [-m m®le ] [-c ] [-f f®le ] [-h ] ®le ...

DESCRIPTION

file performs a series of tests on each ®le in an attempt to classify it. If ®le appears to be an ASCII ®le, file examines the ®rst 512 bytes and tries to guess its language. If ®le is an executable a.out ®le, file prints the version stamp, provided it is greater than 0 (see the description of the -Voption in ld(1)).

file uses the ®le /etc/magic to identify ®les that have some sort of magic number, that is, any ®le 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: -mmfile

-c

-fffile Obtain the list of ®les to be examined from ®le f®le. file classi®es each ®le whose name appears in f®le.

-h

EXTERNAL INFLUENCES

Environment Variables

LC_MESSAGES determines the language in which messages are displayed.

If LC_MESSAGES is not speci®ed in the environment or is set to the empty string, the value of LANG is used as a default for each unspeci®ed or empty variable. If LANG is not speci®ed 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

Single- and multi-byte character code sets are supported. However, all non-ASCII text ®les are identi®ed as "data".

WARNINGS

The file command for a release interprets the core ®les for that particular release correctly. Using the file command on a core ®le generated on a different release will report incorrect results.

SEE ALSO

ld(1).

STANDARDS CONFORMANCE file: SVID2, SVID3, XPG2, XPG4

Section 1270

− 1 −

HP-UX Release 11i: December 2000