MPE/iX Shell and Utilities Reference Manual, Vol 1

file(1) MPE/iX Shell and Utilities file(1)
NAME
file — determine file type
SYNOPSIS
file [–c][–f filelist][–m magic] file ...
DESCRIPTION
Note: The MPE/iX implementation of this utility does not function exactly as this man page
describes. For details, see the MPE/iX NOTES section at the end of this man page.
file makes a guess at the type of each file argument by inspecting the attributes and (for an
ordinary file) reading an initial part of the file. file compares each file on the command line
to templates found in a system-maintained magic file to determine their file type.
file then divides files which do not match a template in the magic file into text files and
binary data. Then, by reading an initial segment of the text files and making an informed
guess based on the contents, file further divides text files into various types such as:
C
pro-
grams, assembler programs, files of commands to the shell, text with nroff or other embed-
ded formatting commands, and yacc or lex programs.
file displays the name of each file along with the file type that it believes the file to be.
Options
file accepts the following options:
–c only checks the template file of magic numbers for validity of format. The magic
numbers given in the template file describe particular types of files.
–f filelist
examines the files listed in the file filelist.
–m magic
uses the file magic rather than the default file of file-type templates.
FILES
file uses the following file:
/etc/magic
default template file of magic numbers.
Commands and Utilities 1-227