Monday 4 September 2017

Linux man command

Linux man command

  • About man
  • man syntax
  • man examples
  • Related commands
  • Linux and Unix commands help

About man

On Linux and other Unix-like operating systems, man is the interface used to view the system's reference manuals.
Description

man is the system's manual viewer; it can be used to display manual pages, scroll up and down, search for occurrences of specific text, and other useful functions.
Each argument given to man is normally the name of a program, utility or function. The manual page associated with each of these arguments is then found and displayed. A section number, if provided, will direct man to look only in that section of the manual. The default action is to search in all of the available sections, following a pre-defined order and to show only the first page found, even if page exists in several sections.


man syntax



General Options


-h,       
                                      --help    Print a help message and exit.
-V,
                                             --version    Display version information and exit.
-C file,
--config-file=file             Use configuration file file rather than the default of 
                                                 ~/.manpath.
-d,
--debug                                  Print debugging information.
-D,
--default                                This option, when used, is normally specified as the first 
                                                  option; it resets man's behaviour to its default. Its use is 
                                                  to reset those options that may have been set in 
                                                  $MANOPT. Any options that follow -D will have their 
                                                   usual effect.
--warnings[=warnings]   
              Enable warnings from the groff text formatter. This 
                                                  may be used to perform sanity checks on the source 
                                                  text of manual pages. warnings is a comma-separated 
                                                  list of warning names; if it is not supplied, the default is 
                                                  "mac". See the "Warnings" node in the groff info page for 
                                                   a list of available warning names.


Options: Main Modes of Operation

-f, --whatis                               Equivalent to the whatis command; displays a short 
                                                description from the manual page, if available.
-k, --apropos                             Equivalent to the apropos command; Search the short 

                                                manual page descriptions for keywords and display any 
                                                matches.
-K, --global-apropos                   Search for text in all manual pages. This option is a 

                                                brute-force search, and is likely to take some time; if you 
                                                can, you should specify a section to reduce the number 
                                                of  pages that need to be searched. Search terms may be 
                                                simple strings (the default), or regular expressions if the 
                                                --regex option is used.
-l, --local-file                           Activate 'local' mode. Format and display local manual 

                                                files instead of searching through the system's manual 
                                                collection. Each manual page argument will be 
                                                interpreted as an nroff source file in the correct format. 
                                                No cat file is produced. If a dash ('-') is listed as one of 
                                                the arguments, input will be taken from stdin. When this 
                                                option is not used, and man fails to find the page 
                                                required, before displaying the error message it attempts 
                                                to act as if this option was supplied, using the name as a 
                                                file name and looking for an exact match.
-w, --where, --location              Don't actually display the manual pages; instead print the 

                                                location(s) of the source nroff files that would be 
                                                formatted.
-W, --where-cat, --location-cat  Don't actually display the manual pages, but do print the 

                                                location(s) of the cat files that would be displayed. If -w 
                                                and -W are both specified, print both, separated by a 
                                                space.
-c, --catman                             This option is not for general use and should only be used 

                                                by the catman program.
-R encoding, --recode=encoding     Instead of formatting the manual page in the usual 

                                                    way, output its source converted to the specified 
                                                     encoding. If you already know the encoding of the 
                                                    source file, you can also use manconv directly. 
                                                    However, this option allows you to convert several 
                                                    manual pages to a single encoding without having to 
                                                    explicitly state the encoding of each, provided that 
                                                    they were already installed in a structure similar to a 
                                                    manual page hierarchy.

Options: Finding Manual Pages








Options: Controlling Formatted Output







 Section Numbers

The section numbers of the manual are listed below. While reading documentation, if you see a command name followed by a number in parentheses, the number refers to one of these sections. For example, man is the documentation of man found in section number 1. Some commands may have documentation in more than one section, so the numbers after the command name may direct you to the correct section to find a specific type of information.
The section numbers, and the topics they cover, are as follows:





 Exit Status


When it terminates, man will return one of the following exit status:




Environment

man makes use of the following environment variables:


Files


The following files are used by man:





 man examples

View the manual page for the man command.


View the manual page for man, with no hyphenated words or justified lines. 






0 comments:

Post a Comment

Good Morning Beautiful

Do you know????

Do you know????
/