Man command to call the Help File Source and syntax keywords

Source: Internet
Author: User
Tags gz file
Article Title: Man command calls help file source and syntax keywords. Linux is a technology channel of the IT lab in China. Configuration files that contain basic classification Man commands such as desktop applications, Linux system management, kernel research, embedded systems, and open-source are stored in/etc/man. config and opened with vim.
 
[Root @ localhost gliethttp] # vim/etc/man. config
 
We can find that
 
MANPATH/usr/share/man
 
MANPATH/usr/man
 
MANPATH/usr/local/share/man
 
MANPATH/usr/local/man
 
MANPATH/usr/X11R6/man
 
All of the above are man program search paths, such as in redhat9 under vmware5.5 virtual machine:
 
All man files in the/usr/share/man/directory are used. Gz or bz2 files compressed by gz or bz2 have some syntax formats,
 
We can use winrar in windows to open one. Gz file, open the compressed file, with some syntax keywords wrapped in the content displayed when man, such:
 
. \ "-- Indicates the comment content, which is not displayed when man is used. '.' indicates the command, '\' is an escape character, and '"' indicates the comment.
 
. TH -- indicates the starting position of the content displayed when man is used.
 
. SH -- indicates the beginning of a paragraph, and the text written later will be displayed in white when man is used.
 
. TP -- indicates that the start position of the subsequent text display starts from. SH start at the end of the paragraph
 
If no vertex is added, it is the plain text to be displayed, for example:
 
In fork \-create a child process, '\' indicates the escape character, and the '-' character is displayed as a common character.
 
. Br -- line feed
 
. Sp -- indicates that this behavior is empty when it is displayed
 
. B -- indicates that the subsequent text man is displayed as white.
 
. I -- indicates that the subsequent text needs to draw a horizontal bottom line
 
Take/usr/share/man/as an example,
 
[Root @ localhost gliethttp] # cd/usr/share/man/
 
[Root @ localhost man] # ls
 
Cs de_DE fr_FR id ja man2 man4 man6 man8 mann pt_BR sk
 
De fr hu it man1 man3 man5 man7 man9 pl ru sv
 
Go to the man2 directory. After ls, you can view and change it to man2. Gz content, for example, in man2 under redhat9
 
A directory of poll.gz, which indicates execution
 
[Root @ localhost gliethttp] # man poll
 
When you search for helper files related to the pollcommand, The mancommand will unmount the poll.gz compressed file under the man2directory and open the compressed file,
 
Help text wrapped with syntax keywords
 
The file poll.gz is in man2,
 
You can also use
 
[Root @ localhost gliethttp] # man 2 poll
 
Command to force the man command to search for the poll help content in the 2nd folder (gliethttp_20071123)
 
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.