Man page/Navigate/fr

Ce guide vous explique comment naviguer dans les pages de manuel en utilisant man.

Le programme man
Chacun, à un certain stade de sa vie avec Linux l'a utilisé. Il s'agit de la commande. Néanmoins, bien que le programme man lui-même soit assez simple dans sa structure, il dispose de quelques fonctionnalités autres que celle de simplement faire défiler une page. Ce document espère apporter un peu de lumière sur ces fonctionnalités.

Arrangement de Man
Les pages de manuel sont stockées principalement dans le répertoire. Cependant, tant que lemplacement d'une page de manuel est listé dans la variable d'environnement, man est capable de la retrouver. Gentoo stocke généralement les variables  dans. Dans ces répertoires, il existe quelques dossiers intitulés manX, ou X est le numéro de section. Par exemple, un arrangement standard de man ressemble à ceci :

La numérotation réelle des sections semble être tout à fait standard. Néanmoins, notez qu'il y a un dossier  et quelques  dossiers. La table suivante présente les répertoires de pages de manuel ci-dessus et ce qu'ils contiennent :

Bien que cela ne soit pas une liste détaillée et exhaustive, elle couvre les pages de manuel qui intéressent la plupart des gens. Cependant, dans certains cas, vous pouvez savoir ce qu'une section présente aussi aisément que de consulter cette table. Le prochain chapitre vous montrera comment parcourir cet arrangement.

Browsing the man layout
Now that we understand the man layout, we can begin to look it over for commands. Sometimes we may need to narrow down what man page we want. The first way would be addressing by section. To found out a description of a section, once can use  like so:

Unfortunately, this doesn't always work! However, luckily for us there is another way to search for commands that may return multiple results (such as a library call and system command having the same name). To do so, we use the  parameter to man like so:

Sometimes the output may be a lot larger. In this case it might be better to specify more specific keywords. Now that we know where to find the man page, the next section will look at viewing the man page.

Viewing man pages
Viewing man pages can be done in 2 ways, first is with. The second way is. Let's take  for example. I can view either the first man page that comes up on  (which would be section 1, because it is the lowest section containing a man page on   ):

However, what if I want the POSIX version? Then I can use the second form:

And the man page is displayed. Now that we have the man page up, it's time to work with it. The next section will look at navigation and searching.

Navigating and searching man pages
Navigating a man page is fairly simple. To move up and down line by line, use the up and down arrow keys. To move up page by page, you can use the page up and page down keys. Do however note that these navigation instructions assume the environmental  variable is set to use the default pager,. Less also has a few other commands for navigation, but the arrow keys usually suffice:

Additional less navigation keys

Searching, however, is more interesting. The two most basic searches are  and. The first version searches forwards, and the second searches backwards. is a regular expression pattern that is described in. Let's take for example searching for the  option to. First, bring up the emerge man page:

Then, at the screen, press the  key to bring up the entry prompt to search forwards and enter in our search pattern:

Bringing up the forward search prompt

This will search the man page, and bring the searched item into focus:

Forward search results

If you hit a search result by accident and want to continue searching for the same results, simply press the  key again, and press enter (i.e. don't put a pattern it). This will cause the search to default to the last pattern used. Now with some man pages, options are listed, then explained later on. Take the  man page. It lists the files used, then explains their usage. Searching forward a few times would return the results, but there's an easier way to handle this, with the second search form, backwards searching. Let's use this to find the description on. First, bring up  :

Now press. This will bring you to the end of the page:

End of the man page after SHIFT+g

Now we'll go ahead and enter the pattern to search for with the  backwards search option. First press the  key to bring up the prompt, and then enter in  , our query:

Specifying our search

Then hit enter to bring up the result:

Our search result

And the search is complete! Note that just as with , using   search with no pattern will use the last pattern to search.

Conclusion
This concludes the man guide. This will hopefully shed some light on navigating man pages, and maybe even give a few new tips to the more experienced users. For those who prefer alternate means of navigating man pages, the following are also available:


 * app-text/man2html - a program for converting man pages to html
 * app-text/tkman - a tk based man page browser

Also the  web browser   can browse man pages using the   syntax in the address bar.

Acknowledgements
We would like to thank the following authors and editors for their contributions to this guide:


 * Chris White