Как эффективно использовать страницы руководства?

Система -> Настройки -> Внешний вид -> Вкладка «Визуальные эффекты» -> Обычный

1
задан 5 July 2016 в 20:26

2 ответа

Я рекомендую использовать apropos для более эффективного поиска файлов man в системе.

apropos может либо искать все со словом, которое соответствует ему, либо вы можете искать с помощью переключателя -e.

Примеры ниже:

terrance@terrance-Linux:~$ apropos reboot
grub-reboot (8)      - set the default boot entry for GRUB, for the next boot...
halt (8)             - Halt, power-off or reboot the machine
poweroff (8)         - Halt, power-off or reboot the machine
reboot (2)           - reboot or enable/disable Ctrl-Alt-Del
reboot (8)           - Halt, power-off or reboot the machine
rescan-scsi-bus.sh (8) - script for adding and removing SCSI devices without ...
shutdown (8)         - Halt, power-off or reboot the machine
systemd-reboot.service (8) - System shutdown logic

или ...

terrance@terrance-Linux:~$ apropos -e reboot
halt (8)             - Halt, power-off or reboot the machine
poweroff (8)         - Halt, power-off or reboot the machine
reboot (2)           - reboot or enable/disable Ctrl-Alt-Del
reboot (8)           - Halt, power-off or reboot the machine
shutdown (8)         - Halt, power-off or reboot the machine

Как вы можете видеть выше, что я получил два разных списка команд, полученных в результате поиска команды reboot. Число в ( ) - номер раздела. Команда reboot указана с двумя разными номерами. Любая из строк, где он не дублируется, нужно только делать man <command>, не нужно номер секции.

Чтобы открыть раздел, это будет команда:

man 2 reboot

вернет эту страницу:

REBOOT(2)                  Linux Programmer's Manual                 REBOOT(2)

NAME
       reboot - reboot or enable/disable Ctrl-Alt-Del

SYNOPSIS
       /* For libc4 and libc5 the library call and the system call
          are identical, and since kernel version 2.1.30 there are
          symbolic names LINUX_REBOOT_* for the constants and a
          fourth argument to the call: */

       #include <unistd.h>
       #include <linux/reboot.h>

       int reboot(int magic, int magic2, int cmd, void *arg);

       /* Under glibc and most alternative libc's (including uclibc, dietlibc,
          musl and a few others), some of the constants involved have gotten
          symbolic names RB_*, and the library call is a 1-argument
          wrapper around the 3-argument system call: */

       #include <unistd.h>

или

man 8 reboot

вернет эту страницу руководства:

HALT(8)                              halt                              HALT(8)

NAME
       halt, poweroff, reboot - Halt, power-off or reboot the machine

SYNOPSIS
       halt [OPTIONS...]

       poweroff [OPTIONS...]

       reboot [OPTIONS...]

DESCRIPTION
       halt, poweroff, reboot may be used to halt, power-off or reboot the
       machine.

OPTIONS
       The following options are understood:

       --help
           Print a short help text and exit.

       --halt

Усечено выше примеров для пространство

Надеюсь, это поможет!

2
ответ дан 23 May 2018 в 08:30

Можно также использовать man -k (или apropos), чтобы найти справочные страницы, соответствующие тексту в кратком описании раздела руководства, например:

apropos directory

.. найдет все справочные страницы с «справочником» в разделе краткого описания руководства.

1
ответ дан 23 May 2018 в 08:30

Другие вопросы по тегам:

Похожие вопросы: