version 1.34, 2013/01/17 21:29:14 |
version 1.35, 2015/02/15 22:26:45 |
|
|
such as sockets, symbolic links, and named pipes (FIFOs), |
such as sockets, symbolic links, and named pipes (FIFOs), |
are intuited if they are defined in |
are intuited if they are defined in |
the system header file |
the system header file |
.Aq Pa sys/stat.h . |
.In sys/stat.h . |
.Pp |
.Pp |
The magic tests are used to check for files with data in |
The magic tests are used to check for files with data in |
particular fixed formats. |
particular fixed formats. |
The canonical example of this is a binary executable (compiled program) |
The canonical example of this is a binary executable (compiled program) |
a.out file, whose format is defined in |
a.out file, whose format is defined in |
.Aq Pa elf.h , |
.In elf.h , |
.Aq Pa a.out.h , |
.In a.out.h , |
and possibly |
and possibly |
.Aq Pa exec.h |
.In exec.h |
in the standard include directory. |
in the standard include directory. |
These files have a |
These files have a |
.Dq magic number |
.Dq magic number |
|
|
it will |
it will |
attempt to determine in what language the file is written. |
attempt to determine in what language the file is written. |
The language tests look for particular strings (cf.\& |
The language tests look for particular strings (cf.\& |
.Aq Pa names.h ) |
.In names.h ) |
that can appear anywhere in the first few blocks of a file. |
that can appear anywhere in the first few blocks of a file. |
For example, the keyword |
For example, the keyword |
.Em .br |
.Em .br |