Man -f (1)은 무엇을 의미합니까?

Man -f (1)은 무엇을 의미합니까?

나는 -f다음과 같이 설명된 man의 깃발을 보고 있습니다.

   -f, --whatis
          Equivalent to whatis.  Display a short description from the manual page, if available.  See whatis(1) for details.

실제로 항목을 사용할 때 -f항상 끝에 대괄호가 있고 때로는 여러 항목이 표시됩니다.

결과 의 예 man -f:

man -f grep:

grep (1)             - print lines matching a pattern

man -f man:

man (7)              - macros to format man pages
man (1)              - an interface to the on-line reference manuals

man -f git:

Git (3pm)            - Perl interface to the Git version control system
git (1)              - the stupid content tracker

나는 모든 일반적인 프로그램 설명이 (1).

검색 중인 다른 목록이 무엇인지, 괄호 안의 다른 숫자가 무엇을 의미하는지 식별하는 방법을 설명할 수 있는 사람이 있나요?

참고: 또한 git의 man Git경우 man git. man git매뉴얼을 포함 git하지만 두 가지 모두에 대한 반품 정보를 포함하지 않는 것은 직관적이지 않은 Git것 같습니다 man -f git.

답변1

괄호 안의 항목(일부 시스템에서는 문자와 숫자의 조합일 수 있지만 대부분은 한 자리 숫자임)은 다음을 나타냅니다.설명서의 섹션. "설명서"는 사용 가능한 설명서를 합친 것입니다.

내 OpenBSD 시스템에서는 다음 섹션이 man(1)매뉴얼에 인용되어 있습니다( "명령 매뉴얼 man"이라고도 하며 로 읽을 수 있음 man man).

1         General commands (tools and utilities).
2         System calls and error numbers.
3         Library functions.
3p        perl(1) programmer's reference guide.
4         Device drivers.
5         File formats.
6         Games.
7         Miscellaneous information.
8         System maintenance and operation commands.
9         Kernel internals.

섹션 번호는 시스템 전체에서 대부분 동일하지만 약간의 차이가 있을 수 있습니다. 섹션은 적어도 POSIX에서는 표준화되지 않았으므로 대부분 전통적이라고 생각합니다.

때로는 어떤 섹션을 찾고 있는지 알아야 할 때도 있습니다. 예를 들어 매뉴얼의 경우도 마찬가지이다 printf. 는 쉘의 유틸리티를 printf(1)나타내고 C 라이브러리 루틴을 설명합니다 . 를 입력하면 을 얻을 가능성이 높습니다 . C 라이브러리 함수에 대한 매뉴얼을 얻으려면 .printfprintf(3)printf()man printfprintf(1)man 3 printf

이 섹션은 1971년 Bell Labs에서 나온 제3판 UNIX(어셈블리 언어가 아닌 C로 작성된 최초의 UNIX)에 도입된 것으로 보입니다.

제3판 UNIX 매뉴얼이 포함되어 있습니다.다음 섹션:

I.    Commands
II.   System calls
III.  Subroutines
IV.   Special files
V.    File formats
VI.   User-maintained programs
VII.  Miscellaneous
VIII. Maintenance

답변2

man man(5문단) 에서 발췌 :

   1   Executable programs or shell commands
   2   System calls (functions provided by the kernel)
   3   Library calls (functions within program libraries)
   4   Special files (usually found in /dev)
   5   File formats and conventions eg /etc/passwd
   6   Games
   7   Miscellaneous (including macro packages and conventions), e.g. man(7), groff(7)
   8   System administration commands (usually only for root)
   9   Kernel routines [Non standard]

답변3

숫자는 정보가 있는 설명서의 어느 섹션(원래 선반에 있던 설명서 세트의 물리적 볼륨)을 나타냅니다.

에서 man man:

   The table below shows the section numbers of the manual followed by the  types  of
   pages they contain.

   1   Executable programs or shell commands
   2   System calls (functions provided by the kernel)
   3   Library calls (functions within program libraries)
   4   Special files (usually found in /dev)
   5   File formats and conventions eg /etc/passwd
   6   Games
   7   Miscellaneous   (including  macro  packages  and  conventions),  e.g.  man(7),
       groff(7)
   8   System administration commands (usually only for root)
   9   Kernel routines [Non standard]

나중에 일부 추가 '섹션'이 추가되었습니다. 예를 들어, (3pm)위에 인용된 텍스트의 는 Perl 모듈(또는 라이브러리)을 나타냅니다.

답변4

명령 뒤의 숫자는 해당 명령에 대한 문서가 매뉴얼 페이지의 어느 섹션에 있는지 알려줍니다. 예를 들어, grep(1)은 grep에 대한 매뉴얼 페이지가 매뉴얼 페이지의 섹션 1에서 찾을 수 있음을 의미합니다.

UNIX의 종류와 Linux의 배포판에 따라 어떤 명령의 문서가 어느 섹션에 있는지에 대한 규칙이 다릅니다.

관련 정보