Friday, 6 February 2015

Getting Help?


They say: "a true linux operator never use internet for any help!
I wondered what in the world does that line means. After understanding the basics and that whole documentation and explanation is provided in Linux itself, I realized the significance of phrase. 
where simple internet search will give you a lots of simple solutions, but on the other hand facts are that neither you will get any internet access on any good production environment due to security reasons and nor you can validate the authenticity of the commands/solutions provided on any blog/forum with your version of linux you work on.

So, it is always best practice to stand up and get help to yourself from the system itself.

Help tools:

manual page:

 man page (short for manual page) is a form of online software documentation usually found on a Unix or Unix-like operating system. Topics covered include computer programs (including library and system calls), formal standards and conventions, and even abstract concepts.

How to access/read man pages

  • man commandTo read a manual page for a Unix command - "man <command_name>"
Pages are traditionally referred to using the notation "name(section)": for example, ftp(1). The same page name may appear in more than one section of the manual, such as when the names of system calls, user commands, or macro packages coincide. Examples are man(1) and man(7), or exit(2) and exit(3).
The syntax for accessing the non-default manual section varies between different man implementations. On Linux and BSD derivatives, for example, the syntax for reading printf(3C) is: "man 3 printf

"

The manual is generally split into eight numbered sections, organized as follows (on Research Unix, BSD, OS X and Linux):
SectionDescription
1General commands
2System calls
3Library functions, covering in particular the C standard library
4Special files (usually devices, those found in /dev) and drivers
5File formats and conventions
6Games and screensavers
7Miscellanea
8System administration commands and daemons


All man pages follow a common layout that is optimized for presentation on a simple ASCII text display, possibly without any form of highlighting or font control. Sections present may include:

NAME

The name of the command or function, followed by a one-line description of what it does.

SYNOPSIS
In the case of a command, a formal description of how to run it and what command line options it takes. For program functions, a list of the parameters the function takes and which header file contains its definition.

DESCRIPTION
A textual description of the functioning of the command or function.

EXAMPLES
Some examples of common usage.

  • apropos
Often a wrapper for the "man -k" command, the apropos command is used to search all manual pages for the string specified. This is often useful if one knows the action that is desired, but does not remember the exact command
  • whatis
Whatis command is helpful to get brief information about Linux commands or functions. Whatis command displays man page single line description for command that matches string passed as a command line argument to whatis command. Whatis command searches for string in its index databases which is maintained by mandb program. Whatis command picks short description of NAME section of man page of command that matches to input given to the whatis command.
  • "-h or –help" option of the command itself.
Sometimes you may know the functionality of a command very well, but cannot recollect all the available options for a specific command. Use -h option of the command to review all available options of the command.

Read Info Documents using Unix info Command

When you are not able to find the required information from the Unix man page, try the info documents using the Unix info command as shown below.

No comments:

Post a Comment