debian8 (jessie)을 사용하고 있으며 맨 페이지를 열어 보았습니다. 대신 경고가 나타납니다.
$ man 3 open
No manual entry for open in section 3
See 'man 7 undocumented' for help when manual pages are not available.
맨 페이지 -dev 패키지가 설치되어 있으므로 프로그래머 맨 페이지 (man 3)는 어디에 있습니까?
답변
man 2 open
C 라이브러리 인터페이스가 아닌을 원합니다 man 3 open
. 실제로는 manpages-dev
아닙니다 ( manpage-dev
). man 3 open
Perl 매뉴얼 페이지를 제공합니다.
# Show the corresponding source groff file
man -w 2 open
/usr/share/man/man2/open.2.gz
# Show which package this file belongs to
dpkg -S /usr/share/man/man2/open.2.gz
manpages-dev: /usr/share/man/man2/open.2.gz
# Or use dlocate to show which package this file belongs to
dlocate /usr/share/man/man2/open.2.gz
manpages-dev: /usr/share/man/man2/open.2.gz
답변
맨 페이지 섹션은 맨 페이지 자체에 설명되어 있습니다. man man
쉘 세션에 들어가서 다양한 섹션과 일반적인 내용을보십시오 :
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]
2 장에서는 3 장에서 라이브러리 루틴을 다루는 시스템 호출에 대해 설명합니다. 시스템 호출을위한 랩퍼 인 라이브러리 루틴은 섹션 2에도 설명되어 있습니다.
답변
이에 대한 이유를 더 명확하게 설명하기 위해 맨 페이지는 시스템 호출이기 때문에 섹션 2에 있습니다 (C 라이브러리가 아닌 커널의 일부로 직접 구현 됨).
이 구별은 특히 라이브러리 함수 인 이전 시스템 호출 (아마도 복제를위한 랩퍼이지만 포크는 여전히 섹션 2에 있음)에서 다소 임의적으로 보일 수 있습니다. 일반적으로 섹션 3을 먼저 찾은 다음 섹션 2를 찾을 수 없거나 관련이없는 것 같으면 섹션 2를 시도하십시오. 또한, 섹션 2의 함수 중 일부는 일반적인 프로그램 (예 : getdents, gettid)에서 호출하지 않아야하는 내부 또는 사용되지 않는 Linux 관련 함수입니다.
또한 manpages-posix-dev 패키지를 설치하여 Linux 관련 정보를 포함하지 않고 이식 가능한 관점에서 작성된 일련의 맨 페이지를 얻을 수 있습니다. 이 패키지에서 C 함수에 제공되는 모든 맨 페이지는 3p 섹션에 있습니다.
답변
특정 맨 페이지의 섹션이 확실하지 않은 경우 -a 옵션을 사용합니다.
-a, --all
By default, man will exit after displaying the most suitable manual page it finds.
Using this option forces man to display all the manual pages with names that match the
search criteria.
man 맨 페이지의 예제에서 :
man -a intro
Display, in succession, all of the available intro manual pages
contained within the manual. It is possible to quit between
successive displays or skip any of them.
답변
이 상황에서는 다음 명령 중 하나를 사용하여이 맨 페이지 이름으로 사용 가능한 모든 페이지의 전체 목록을 보는 것이 유용합니다.
$ man -k ^open$
$ apropos -r ^open$
$ man -f open
$ whatis open
결과는 동일합니다.
open (1) - start a program on a new virtual terminal (VT).
open (2) - open and possibly create a file or device
또는 모든 기존 맨 페이지의 내용을보고 필요한 사항을 식별하십시오.
$ man -a open