Linux基础知识之man手册的使用(2)


?keyword:以keyword指定的字符串为关键字,从当前界面所在位置向文件首部搜索;不区分字符大小写
n:跟收缩命令同方向,下一个      N:跟搜索命令反向,上一个

当不看man手册时q为退出

man的实际应用
下面通过一个实际的问题,来说明man的作用

例子:字符终端登陆时,显示当前登陆终端号,主机名和当前时间。
要求使用man查找实现上述要求,提示:修改/etc/issue文件。怎么修改可以通过man查看issue求助。
我们先用cat看下/etc/issue文件

# cat /etc/issue
CentOS release 6.8 (Final)
Kernel \r on an \m

之后我们
man issue

Formatting page, please wait...
ISSUE(5)                  Linux Programmer’s Manual                  ISSUE(5)
 
NAME
      issue - pre-login message and identification file
 
DESCRIPTION
      The  file  /etc/issue is a text file which contains a message or system
      identification to be printed before the login prompt.  It  may  contain
      various  @char and \char sequences, if supported by the getty-type pro-
      gram employed on the system.
 
FILES
      /etc/issue
 
SEE ALSO
      motd(5), agetty(8), mingetty(8)
 
COLOPHON
      This page is part of release 3.22 of the Linux  man-pages  project.  A
      description  of  the project, and information about reporting bugs, can
      be found at .
 
Linux                            1993-07-24                          ISSUE(5)

查看之后发现找不到一点有价值的信息,不过在最后提示我们可以查看motd、agetty、mingetty这三个文件。
man motd
MOTD(5)                    Linux Programmer’s Manual                  MOTD(5)
 
NAME
      motd - message of the day
 
DESCRIPTION
      The  contents of /etc/motd are displayed by login(1) after a successful
      login but just before it executes the login shell.
 
      The abbreviation "motd" stands for "message of the day", and this  file
      has  been  traditionally  used  for exactly that (it requires much less
      disk space than mail to all users).
 
FILES
      /etc/motd
 
SEE ALSO
      login(1), issue(5)
 
COLOPHON
      This page is part of release 3.22 of the Linux  man-pages  project.  A
      description  of  the project, and information about reporting bugs, can
      be found at .
 
Linux                            1992-12-29                          MOTD(5)

motd里面也没有值得我们参考的信息,继续下一个
man agentty
AGETTY(8)                                                            AGETTY(8)
 
NAME
      agetty - alternative Linux getty
 
SYNOPSIS
      agetty  [-8ihLmnUw]  [-f  issue_file]  [-l login_program] [-I init] [-t
      timeout] [-H login_host] port baud_rate,...  [term]
      agetty [-8ihLmnw] [-f issue_file]  [-l  login_program]  [-I  init]  [-t
      timeout] [-H login_host] baud_rate,...  port [term]
 
DESCRIPTION
      agetty  opens  a  tty  port,  prompts  for a login name and invokes the
      /bin/login command. It is normally invoked by init(8).
 
      agetty has several non-standard features that are useful for hard-wired
      and for dial-in lines:
 
      o      Adapts  the tty settings to parity bits and to erase, kill, end-
              of-line and uppercase characters when it  reads  a  login  name.
              The  program can handle 7-bit characters with even, odd, none or
              space parity, and 8-bit characters with no parity. The following
              special  characters  are  recognized: @ and Control-U (kill); #,
              DEL and back space (erase); carriage return and line  feed  (end
              of line).  See also --erase-chars and --kill-chars options.
 
      o      Optionally  deduces the baud rate from the CONNECT messages pro-
              duced by Hayes(tm)-compatible modems.
              ...
              ..
              .

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/15127.html