Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The usage of man and info commands in Linux system

2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces the knowledge of "the usage of man and info commands in Linux system". Many people will encounter this dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Man

Usage: man [OPTION...] [chapter] man pages.

-C,-- the config-file= file uses this user settings file

-d,-- debug outputs debugging information

-D,-- default resets all options to default values

-- warnings [= warning] warning to turn on groff

Main operation modes:

-f,-- whatis is equivalent to whatis

-k,-- apropos is equivalent to apropos

-K,-- global-apropos search for text in all pages

-l,-- local-file

Interpret the "man page" parameter as a local file name

-w,-- where,-- path,-- location

The physical location of the output man page

-W,-- where-cat,-- location-cat

The physical location of the output cat file

-c,-- catman is used by catman to target obsolete cat

Page relayout

-R,-- recode= encodes output source page encoded in ENCODING

Find the man page:

-L,-- locale= region

Define the locale used for this man page search

-m,-- systems= system use manual pages from other systems

-M,-- manpath= path sets the path of the search manual page to "path"

-S,-s,-- sections= list uses a list of chapters separated by half-width colons

-e,-- extension= extension

Limit search to man pages with an extension type of "extension"

-I,-- ignore-case is not case-sensitive when looking for man pages

(default)

-I,-- match-case is case-sensitive when looking for man pages.

-- regex show all pages matching regex

-- wildcard show all pages matching wildcard

-names-only make-regex and-wildcard match page names only

Not descriptions

-a,-- all looks for all matching man pages

-u,-- update forces cache consistency checking

-- no-subpages don't try subpages, e.g. 'man foo bar' = >' man

Foo-bar'

Control the formatted output:

-P,-- pager=PAGER uses the PAGER program to display output text

-r,-- the prompt= string provides less pager with a prompt line

-7,-- ascii displays the ASCII translation form of some latin1 characters

-E,-- encoding= encodes use selected output encoding

-no-hyphenation,-nh turn off hyphenation

-no-justification,-nj turn off justification

The-p,-- preprocessor= string string indicates which preprocessors to run:

E-[n] eqn, p-pic, t-tbl

G-grap, r-refer, v-vgrind

-t,-- troff uses groff counterpart album typesetting

-T,-- troff-device [= device] designated device using groff

-H,-- html [= browser] displays HTML using www-browser or a specified browser

Output

-X,-- gxditview [= Resolution] uses groff and passes gxditview (X11)

To display:

-X =-TX75,-X100 =-TX100,-X100-12 =-TX100-12

-Z,-- ditroff uses groff and forces it to generate ditroff

-help give this help list.

-- usage give a short usage message

-V-- version print program version

Example:

The code is as follows:

[root@linux ~] # man ifconfig # View the ifconfig manual

Info

Usage: info [OPTION]. [MENU-ITEM...]

Read the document in Info format.

Options:

-k,-- apropos=STRING looks for STRING in the index of all man pages.

-d,-- directory=DIR adds DIR to INFOPATH.

-- dribble=FILENAME puts the user's keystroke entry in FILENAME.

-f,-- file=FILENAME specifies the Info file you want to browse.

-h,-- help displays this help and exits.

-- index-search=STRING jumps to the node referred to by the index entry STRING.

-n,-- node=NODENAME specifies the node in the first browsed Info file.

-o,-- output=FILENAME outputs all selected nodes to FILENAME.

-R,-- raw-escapes outputs the "original" ANSI escape character (default).

-- no-raw-escapes outputs escape characters as plain text.

-- restore=FILENAME reads the initial keystroke entry from FILENAME.

-O,-- show-options,-- usage jumps to the command line option node.

-- subnodes recursively outputs menu items.

Vi-keys uses keystroke bindings similar to vi and less.

-- version displays version information and exits.

-w,-- where,-- location prints the location of the Info file in the system.

If there is the first non-option parameter, it will be a menu entry for the start

All "dir" files that follow the INFOPATH variable search for this entry.

If this parameter does not exist, info merges all "dir" files and displays the results.

Any subsequent parameters are considered to be the same as the initial browse

The name of the menu item associated with the node.

Press h in the help information to get the content about the key binding.

Example:

Info displays the top-level catalog menu

Info info displays the general manual of Info readers

Info info-stnd displays this Info program specific manual

Info emacs browses the emacs node from the top-level directory

Info emacs buffers browses the buffers node in the emacs man page

Info-- show-options emacs browses nodes related to the command line option of emacs

Info-- subnodes-o out.txt emacs outputs the entire man page to out.txt

Info-f. / foo.info displays the file. / foo.info instead of looking for a directory

Example:

The code is as follows:

[root@linux ~] # info ifconfig # View the ifconfig manual

This is the end of the introduction to the usage of man and info commands in the Linux system. Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report