Linux User: Linux man learning

Source: Internet
Author: User

To learn about linux, we need to contact man for many problems. Get familiar with man today.

1. Simple usage is man (xxx ).

If you cannot remember the complete name of the tool or function, you can use the-k parameter, for example, to find the help related to printf:

Man-k printf

Apropos printf


If you have other constraints, use grep to filter them out.

Man
-K printf | grep ^ printf


If you only want to know what it is, you can use the-f parameter.

Man-f printf

Whatis printf


2. You can add a numeric parameter after the man command to indicate specific range positioning:


Number "1": executable command or shell command

Number "2": System Call (functions provided by the kernel)

Number "3": C Language Library Function

Number "4": device or special file (usually under/dev)

Number "5": file format and rules (for example,/etc/passwd)

Number "6": Game

Number "7": Miscellaneous (macros, packages, and other miscellaneous)

Number "8": System Administrator-related commands (usually only for root)

Number "9": file related to the kernel


3. man page is roughly divided into the following parts:

Generally, let's take a look at EXAMPLE and check OPTIONS. If the problem persists, see also again.

4. Where does my man information exist in Linux?

[Root @ wupengchong ~] # Manpath

You can use the manpath command to find the corresponding help information. If not, man will complain:

[Root @ wupengchong ~] # Man rocrocket
No manual entry for rocrocket

5. How to re-create a man database?

Run the makewhatis command!

6 since there is a man database, Can I search for keywords like a search engine?

Yes. In this way:

$ Man-k roc

Use man's-k option to list all man help information containing the roc string.

In fact, the man-k and apropos commands work in the same way. You can use apropos roc instead of man-k roc.

In fact, apropos is a script file, which is not an ELF executable file. So you can use vi
/Usr/bin/apropos to see how it is implemented.

7. If you want to learn more about man, just man.

Man

After entering the man command function, you can press the Space key to flip down the page, you can press the q button to exit the man environment. You can also use [Page Up] and [Page Down] to flip pages.
At the same time, if you know some keywords, you can enter "/word" at any time to actively search for keywords! For example, enter "/OPTIONS" in the search 』. The operation is similar to that of VIM.


Supplement:

In the vim editor, you can use the uppercase letter K to obtain help information about the cursor position. For example, you can position the cursor to printf, and then press ESC, press SHIFT + k to get help.

We recommend a very good man website, http://www.linuxmanpages.com/, where there is a very full set of maninformation for 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.