FILE (1)

NAME

file - determine file type

CONTENTS

Synopsis
Description
Files
Environment Variables
Notes

SYNOPSIS

file [-h] [-m mfile] [-f ffile] [-z] arg ...
file [-h] [-m mfile] [-z] -f ffile
file [-c] [-m mfile]

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.

File formats identified by a magic number (that is a defined value at a defined place of the file) are detected using the definitions in a magic file (/usr/5lib/magic by default).

The file command accepts the following options:
-c Complain about format errors in the magic file and display a summary of the magic known after reading.
-f ffile The file given contains the names of other files to be examined, one file name per line.
-h Symbolic links are normally followed. This option causes file not to follow symbolic links but to print their target instead.
-m mfile Use mfile instead of /usr/5lib/magic as the magic file.
-z If a file turns out to be compressed with compress(1), gzip(1), or bzip2(1), do not further examine the file itself but run the appropriate decompression program and examine its output. This option is an extension.

FILES

/usr/5lib/magic

ENVIRONMENT VARIABLES

SYSV3 Causes the text of some messages to be changed.

NOTES

File often makes mistakes. In particular it often suggests that command files are C programs.

File does not currently accept the -d, -i, -M file, and -m file options from POSIX.1-2001.


Heirloom Toolchest FILE (1) 2/6/05
Generated by a modified version of manServer 1.07 from file.1 using man macros.