Rich: переводы
Linux Fundamentals Part 3 / Основы Linux от основателя Gentoo. Часть 3
→For more information on "man" and friends, you should start with its man page:
0 Для более подробной информации о мане и его друзьях, вы можете изучить его ман-страницу:
→The example on the previous panel brings up a few more points. First, the apropos command is exactly equivalent to man -k. (In fact, I'll let you in on a little secret. When you run man -k, it actually runs apropos behind the scenes.) The second point is the makewhatis command, which scans all the man pages on your Linux system and builds the database for whatis and apropos. Usually this is run periodically by root to keep the database updated:
0 Предыдущий пример переносит на на несколько моментов вперёд. Во-первых, команда apropos полностью соответствует команде man -k (Вообще-то, я посвящу вас в небольшой секрет. Когда вы запускаете man -k, в самом деле «за кулисами» стартует apropos). Во-вторых, существует команда makewhatis, которая сканирует все страницы в вашей Linux системе и составляет базу данных команду для whatis и apropos. Она запускается периодически планировщиком из-под рута, чтобы поддерживать базу данных свежей:
→All about apropos
0 Всё об “apropos”
→$ man -k whatis
apropos (1) - search the whatis database for strings
makewhatis (8) - Create the whatis database
whatis (1) - search the whatis database for complete words
apropos (1) - search the whatis database for strings
makewhatis (8) - Create the whatis database
whatis (1) - search the whatis database for complete words
0 $ man -k whatis
apropos (1) - search the whatis database for strings
makewhatis (8) - Create the whatis database
whatis (1) - search the whatis database for complete words
apropos (1) - search the whatis database for strings
makewhatis (8) - Create the whatis database
whatis (1) - search the whatis database for complete words
→Sometimes it's hard to find the right man page for a given topic. In that case, you might try using man -k to search the NAME section of the man pages. Be warned that it's a substring search, so running something like man -k ls will give you a lot of output! Here's an example using a more specific query:
0 Иногда сложно найти правильную ман-страницу по заданной теме. В этом случае вы можете использовать man -k для поиска в разделе ИМЯ ман-страницы. Будьте осторожны: man -k осуществляет поиск по подстроке, так что выведется много информации! Вот пример использования уточняющего запроса:
→In this case, man printf would default to the page in section 1 ("User Programs"). If we were writing a C program, we might be more interested in the page from section 3 ("Library functions"). You can call up a man page from a certain section by specifying it on the command line, so to ask for printf(3), we would type:
0 В данном случае, man printf сначала обратиться к странице в секции 1 («Пользовательские программы»). Если мы пишем программу на языке C, нас может заинтересовать страница из секции 3 («Библиотечные функции»). Вы можете вызывать ман необходимой секции указав это в командной строке, т.н. для вызова printf(3) мы введём:
→Some topics exist in more than one section. To demonstrate this, let's use the whatis command, which shows all the available man pages for a topic:
0 Некоторые темы существуют более чем в одной секции. Для демонстрации этого используется команда whatis, показывающая доступные ман-страницы по теме:
→The files that comprise manual pages are stored in /usr/share/man (or in /usr/man on some older systems). Inside that directory, you will find that the manual pages are organized into the following sections:
man1 User programs
man2 System calls
man3 Library functions
man4 Special files
man5 File formats
man6 Games
man7 Miscellaneous
Multiple man pages
man1 User programs
man2 System calls
man3 Library functions
man4 Special files
man5 File formats
man6 Games
man7 Miscellaneous
Multiple man pages
0 Файлы, содержащие информацию манов хранятся в /usr/share/man (или в /usr/man на некоторых старых системах). В этой директории вы найдёте страницы руководств, упорядоченные по следующим секциям:
man1 Пользовательские программы
man2 Системные вызовы
man3 Библиотечные функции
man4 Специальные файлы
man5 Форматы файлов
man6 Игры
man7 Другое
Множественные ман-страницы
man1 Пользовательские программы
man2 Системные вызовы
man3 Библиотечные функции
man4 Специальные файлы
man5 Форматы файлов
man6 Игры
man7 Другое
Множественные ман-страницы
0 $ whatis printf
printf (1) - format and print data
printf (3) - formatted output conversion
printf (1) - format and print data
printf (3) - formatted output conversion
→$ man 3 printf
0 $ man 3 printf
→# makewhatis
0 # makewhatis
→$ man man
0 $ man man
→MANPATH /opt/man
0 MANPATH /opt/man
→$ info diff
0 $ info diff
→$ info info
0 $ info info
→/usr/share/doc
0 /usr/share/doc
0 $ cd /usr/share/doc
$ find . -type f | wc -l
7582
$ find . -type f | wc -l
7582
0 * Redhat Linux
* Debian Linux
* Gentoo Linux
* SuSE Linux
* Caldera
* Turbolinux
* Debian Linux
* Gentoo Linux
* SuSE Linux
* Caldera
* Turbolinux
0 * IBM и Linux
* HP и Linux
* Sun и Linux
* Oracle и Linux.
* HP и Linux
* Sun и Linux
* Oracle и Linux.
→Knowing the layout of a man page can be helpful to jump quickly to the information you need. In general, you will find the following sections in a man page:
NAME Name and one-line description of the command
SYNOPSIS How to use the command
DESCRIPTION In-depth discussion on the functionality of the command
EXAMPLES Suggestions for how to use the command
SEE ALSO Related topics (usually man pages)
man page sections
NAME Name and one-line description of the command
SYNOPSIS How to use the command
DESCRIPTION In-depth discussion on the functionality of the command
EXAMPLES Suggestions for how to use the command
SEE ALSO Related topics (usually man pages)
man page sections
0 Знание схемы мана поможет быстро перемещаться к необходимой вам информации. Обычно, вы сможете найти следующие разделы в мане:
ИМЯ Имя и однострочное описание команды
СИНОПСИС Как использовать команду
ОПИСАНИЕ Углублённое описание функционала команды
ПРИМЕРЫ Советы как использовать команду
СМ. ТАКЖЕ Связаные темы (обычно также ман-страницы)
ИМЯ Имя и однострочное описание команды
СИНОПСИС Как использовать команду
ОПИСАНИЕ Углублённое описание функционала команды
ПРИМЕРЫ Советы как использовать команду
СМ. ТАКЖЕ Связаные темы (обычно также ман-страницы)
Резюме
- Пол:
- мужчина
- Родной язык:
- русский
- С нами:
-
с 11 июня 2008 г.
(6703 дня)
Не является членом клуба. - Деятельность:
-
217 версий перевода
с общим рейтингом −20
21 комментарий
Карма: 0 (оценок: 2)
