man command

Upload: sourabh-bhandari

Post on 10-Apr-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/8/2019 Man Command

    1/2

    man Command

    man command is the online help facility available in UNIX. The syntax of many

    UNIX commands are confusing and are not easy to remember, thus man command

    offers exclusive help by displaying the documentation of virtually every command ofthe UNIX system. For example, to seek the help for ls command, we use :

    $ man ls [press Enter]

    You will see that the entire man page for the ls command will be displayed on the

    screen. The man page is actually displayed on the pager program. The pager is an

    UNIX command and man command is preconfigured with pager. The man command

    displays the first page then the screen pauses. To perform the navigation to check out

    other pages, you can use the following keys :

    1. for spacebar can be used to forward the screen display.

    2. b is used to move the screen backward.

    If you want to search a keyword in the man documentation then you can type the

    string to be found with forward slash (/) and press enter as :

    /keyword [press Enter]

    you will be taken to the page containing directory. If this is not the page you were

    looking for, then you can repeat the search by pressing n.

    To quit the pager and man page, just press q and you will be returned to the shell's

    prompt.

    Understanding the man page

    A man page has various compulsary and optional sections. The three sections will see

    in all the commands are : NAME, SYNOPSIS and DESCRIPTION. Let us discussthese sections :

    1. NAME : It displays the brief introduction of command.

    2. SYNOPSIS: It describes the syntax used by command.

    3. DESCRIPTION : It gives the detailed explanation of the command.

    The SYNOPSIS has certain conventions as :

    1. If the argument is enclosed in rectangular brackets, then it is optional otherwise

    it is required.

    Copyright Sourabh Bhandari http://sourabhandari.in

  • 8/8/2019 Man Command

    2/2

    2. The ellipsis (three dots) implies that there can be more than one instance of

    preceding word i.e [FILE], there can be more than one filename as an

    argument.

    3. It there is pipe (|) somwhere, then it means only one option can be used from

    the options shown on the either side of pipe (|).

    Copyright Sourabh Bhandari http://sourabhandari.in