FILE(1) | General Commands Manual | FILE(1) |
file
— determine
file type
file |
[-bchiLsW ] file ... |
The file
utility tests each argument and
attempts to determine its type. Three sets of tests are performed:
file
is not running as root). The file format is
described in magic(5).The first test which succeeds causes the file type to be printed. The type will often contain one of the words text (contains only printing characters and is probably safe to read on an ASCII terminal), executable (the file contains a compiled executable program) or data meaning anything else.
If file is a single dash
(‘-’), file
reads from the standard
input.
The options are as follows:
-b
,
--brief
-c
-h
-i
,
--mime
, --mime-type
-L
,
--dereference
-s
-W
The file
utility exits 0 on
success, and >0 if an error occurs.
file
commands have appeared in many
previous versions of UNIX. This version was written
by Nicholas Marriott for OpenBSD
5.8 to replace the previous version originally written by
Ian Darwin.
There is a large number of contributors to the magic files; many are listed in the source files.
December 24, 2015 | x86_64 |