Man page/Navigate/es

Esta guía muestra como navegar a través de las páginas del manual usando man.

El programa man
Todos nosotros lo usamos en algún momento de nuestro recorrido en Linux. Es el comando man. Aunque el programa parece ser simplista en su diseño, man tiene algunas otras características además de permitir desplazamiento simple a través de una página. Este documento espera dar nuevos bríos acerca de estas capacidades.

Organización de las páginas del manual
Las páginas del manual son mayormente almacenadas en el directorio. Sin embargo, como una página es localizada mediante la variable de entorno, man será capaz de rastrearlas. Generalmente, Gentoo coloca las variables  en. Dentro de estos directorios se encuentran algunas carpetas con la estructura 'manX', donde X es el número de sección. Por ejemplo, una distribución de páginas del manual podría lucir así:

La numeración de secciones parece bastante estándar. Sin embargo, observe que existen unas carpetas y algunas. La siguiente tabla lista los directorios de las páginas de manual y lo que contiene cada uno de ellos:

While this is not an extensive and detailed list, it does cover the man pages that most people will be interested in. However, sometimes you can find out what a section does as easily as looking at this table. The next chapter will look at using man to traverse this layout.

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, one can use man intro 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  option to the man command 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  man [man page name] . The second way is man [man page name]. Let's take for example. I can view either the first man page that comes up on bc (which would be section 1, because it is the lowest section containing a man page on bc):

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 and  arrow keys. To move up page by page, you can use the and  keys. Do however note that these navigation instructions assume the environmental  variable is set to use the default pager, less. Less also has a few other commands for navigation, but the arrow keys usually suffice:

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 man 7 regex. Let's take for example searching for the  option to emerge. 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:

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

If you hit a search result by accident and want to continue searching for the same results, simply press the key again, and press  (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 5 portage 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 man 5 portage:

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

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:

Then hit to bring up the 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:


 * - a program for converting man pages to html
 * - a tk based man page browser

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