Using ‘man’ Page
- ‘man’ page displays commands objective, syntax and their option list.
- It also displays typical examples
Syntax:
1 |
[kalp@kalp-tech.com ~]$man <command_name> |
Example:
1 |
[kalp@kalp-tech.com ~]$man cp |
This command will show the list of available options in the cp(copy) command.
The list will be sufficiently long, so you might require to search text in the man page.
/text is used to search the text in forward direction and then you can press, n : to locate next occurrence of the searched text in forward direction, if you feel that the text has been left behind, use N : to locate next occurrence of the searched text in reverse direction.
Cursor Movement:
g : to move to the top of the ‘man’ page.
G : to move to the bottom of the ‘man’ page.
q : to exit from the ‘man’ page.
For example: If you need to look for the available options with ls
1 |
[kalp@kalp-tech.com ~]$man ls |
There will be following output:
[NOTE: The options can be combined and the effect is combined effect of the commands.]
Sometimes the name of a command might match with the name of a file, for e.g. Assuming I have copied the /etc/passwd file in the home directory.
1 |
[kalp@kalp-tech.com ~]$man passwd |
will not be able to provide exactly what we are looking for.
Use, 1 to represent command and 5 to represent the filename.
For example:
1 |
[kalp@kalp-tech.com ~]$man 1 passwd |
1 |
[kalp@kalp-tech.com ~]$man 5 passwd |
Leave a Reply
You must be logged in to post a comment.