Linux 基础学习二(Linux的线上求助方法--help man page)

Linux的线上求助方法

1. --help 查看命令的语法和参数

.......:~$ date --help
Usage: date [OPTION]... [+FORMAT]
  or:  date [-u|--utc|--universal] [MMDDhhmm[[CC]YY][.ss]]
Display the current time in the given FORMAT, or set the system date.

Mandatory arguments to long options are mandatory for short options too.
  -d, --date=STRING          display time described by STRING, not 'now'
      --debug                annotate the parsed date,
                              and warn about questionable usage to stderr
  -f, --file=DATEFILE        like --date; once for each line of DATEFILE
  -I[FMT], --iso-8601[=FMT]  output date/time in ISO 8601 format.
                               FMT='date' for date only (the default),
                               'hours', 'minutes', 'seconds', or 'ns'
                               for date and time to the indicated precision.
                               Example: 2006-08-14T02:34:56-06:00
  -R, --rfc-2822             output date and time in RFC 2822 format.
................................

...............................

2. man page

#例子,输入以下命令

:~$ man date 

Linux 基础学习二(Linux的线上求助方法--help man page) 。。。。。。。。。。。。

。。。。。。。。。。。。Linux 基础学习二(Linux的线上求助方法--help man page)

 

上面结果的DATE(1)要注意这个(1), 查看下图,知道1表示“一般用户可使用的指令”,下图中需要特别注意1,5, 8的意思,可以记住。

Linux 基础学习二(Linux的线上求助方法--help man page)

在man page里面可以使用下图的常用按键进行操作

Linux 基础学习二(Linux的线上求助方法--help man page)

那么man page的文件数据又是放在哪里的呢?

一般是在/usr/share/man这个目录下面 

 

 

参考:鸟哥的Linux私房菜