About the man in Linux

Source: Internet
Author: User

The man command in Linux is a key Linux command that beginners must master, this command can help in the learning of the various command problems that will not be used, each command can be found here in different ways to get the relevant help information.

(1) man is the abbreviation for manual, which is used to view the various reference manuals brought in by the system, but the manual page is divided into several sections as follows:

1 executable programs or shell commands ordinary user, can be initiated by anyone.

2 system calls (functions provided by the kernel), which is the function provided by the kernel.

3 Library calls (functions within program libraries) libraries called Library functions.

4 special files (usually found In/dev) special file, which is a special file under the/dev directory.

5 Files formats and conventions eg/etc/passwd file format, configuration file Syntax format

6 games

7 miscellaneous (including macro packages and conventions), e.g. man (7), Groff (7) Miscellaneous, such as macro command packages, conventions, and so on.

8 System Administration commands (usually only for root) management class command, can only be initiated by Root.

9 Kernel routines [Non standard] Other (Linux-specific) documents used to store kernel routines.
N new documents, you may want to move to a more appropriate area.
o old documents may be retained for a period of time.
L Local documentation, related to this particular system.

Enter the man+ number + command/function (Man command) in the shell to find the relevant commands and functions.
Without numbers, the man command looks for the relevant commands and functions by default from a manual with a smaller number.
Cases:
Originally to look for the rand () function in the C standard library, the direct use of man Rand was a manual for the rand Command, which was used directly to generate a random number, which is in section 1 of the manual.
If you use Man 3 rand you can get the usage of rand () in the library function you want.

(2) How man works: Find the man file under a path and extract the contents of the file
Structure of files in man
NAME
Synopsis
DESCRIPTION
EXAMPLES
OPTIONS
where info has hyperlinks to command help (with the corresponding story)
Whatis often used with man, Whatis can find the chapters related to man manual
Whatis use a simple description of the command where numbers are used for the chapter
Whatis working mode: There is a Whatis database in which to perform the find
Note: Whatis is not executed when Makewhatis is required
Man-f ls equal to Whatis ls

(3) Some common parameters and usages of man
Man-a COMMAND
Open all areas of the same name help, such as man LS, you will first enter a LS command version ls help, you press the Q key, will enter the LS library function version of the Help
Man-aw COMMAND
Displays the path of all manual files for all command, such as Man-aw ls is
/VAR/CACHE/MAN/CAT1/LS.1.BZ2 (<--/usr/share/man/man1/ls.1.gz)
/usr/share/man/man1p/ls.1p.gz
Man-m COMMAND
Specify the search path for the manual file
Mans command| Col-b > A.txt
Output man manual information to a text file
Man-k COMMAND (k = keyword)
Man-k COMMAND ()

(4) Man's configuration file/etc/man.config
If you don't want each man command to specify a path with-M, you can modify the configuration file to add content such as
Manpath/home/httpd/man
Man man view man using method

(5) Man skills in operation
Blank turn a screen b back Q exit N next n the previous one
Use in the manual? Keyword from file tail to header
/keyword is the opposite of


Documents related to man in the following websites and documents:
/usr/share/doc/ls-2.1.3
Http:/www.redhat.com/docs
Http:/kbase.redhat.com
This is a description of the use of the Linux Man command here.

About the man in Linux

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.