Путеводитель по Руководству Linux

  User  |  Syst  |  Libr  |  Device  |  Files  |  Other  |  Admin  |  Head  |



   file.1p    ( 1 )

определить тип файла (determine file type)

Параметры (Options)

The file utility shall conform to the Base Definitions volume of
       POSIX.1‐2017, Section 12.2, Utility Syntax Guidelines, except
       that the order of the -m, -d, and -M options shall be
       significant.

The following options shall be supported by the implementation:

-d Apply any position-sensitive default system tests and context-sensitive default system tests to the file. This is the default if no -M or -m option is specified.

-h When a symbolic link is encountered, identify the file as a symbolic link. If -h is not specified and file is a symbolic link that refers to a nonexistent file, file shall identify the file as a symbolic link, as if -h had been specified.

-i If a file is a regular file, do not attempt to classify the type of the file further, but identify the file as specified in the STDOUT section.

-M file Specify the name of a file containing position- sensitive tests that shall be applied to a file in order to classify it (see the EXTENDED DESCRIPTION). No position-sensitive default system tests nor context- sensitive default system tests shall be applied unless the -d option is also specified.

-m file Specify the name of a file containing position- sensitive tests that shall be applied to a file in order to classify it (see the EXTENDED DESCRIPTION).

If the -m option is specified without specifying the -d option or the -M option, position-sensitive default system tests shall be applied after the position-sensitive tests specified by the -m option. If the -M option is specified with the -d option, the -m option, or both, or the -m option is specified with the -d option, the concatenation of the position-sensitive tests specified by these options shall be applied in the order specified by the appearance of these options. If a -M or -m file option-argument is -, the results are unspecified.