Chinaunix首页 | 论坛 | 博客
  • 博客访问: 13440
  • 博文数量: 8
  • 博客积分: 1410
  • 博客等级: 上尉
  • 技术积分: 80
  • 用 户 组: 普通用户
  • 注册时间: 2008-12-09 10:27
文章分类

全部博文(8)

文章存档

2009年(3)

2008年(5)

我的朋友
最近访客

分类: LINUX

2009-08-29 11:05:53

我们可以采用man命令进行查询相关工具的使用,man xxx
 
例如:man ls,我们将得到信息:
    LS(1)                          User Commands                          LS(1)
NAME
       ls - list directory contents
SYNOPSIS
       ls [OPTION]... [FILE]...
DESCRIPTION
       List information about the FILEs (the current directory by default).
       Sort entries alphabetically if none of -cftuSUX nor --sort.
       Mandatory arguments to long options are mandatory for short  options
       too.
       (略)

AUTHOR
       Written by Richard Stallman and David MacKenzie.

REPORTING BUGS
       Report bugs to <>.

COPYRIGHT
       Copyright © 2004 Free Software Foundation, Inc.
       This is free software; see the source for copying conditions.  There
       is NO warranty; not even for MERCHANTABILITY or FITNESS FOR  A  PAR-
       TICULAR PURPOSE.

SEE ALSO
       The full documentation for ls is maintained as a Texinfo manual.  If
       the info and ls programs are properly installed at  your  site,  the
       command

              info coreutils ls

       should give you access to the complete manual.

ls (coreutils) 5.2.1             March 2004                           LS(1)

有些也学还有OPTIONS选项.
第一行的LS(1),后面那个数字是有表示意义的,请参考下表:
(来源:)
 

Section 1 user commands (introduction)

Section 2 system calls (introduction)

Section 3 library functions (introduction)

Section 4 special files (introduction)

Section 5 file formats (introduction)

Section 6 games (introduction)

Section 7 conventions and miscellany (introduction)

Section 8 administration and privileged commands (introduction) Section L math library functions

Section N tcl functions

 

它是结合/usr/share/man/目录下/usr/share/man/man?(?表示上述的通配符)

按键 功能
空格 下翻页
[Page Down] 下翻页
[Page Up] 上翻页
[Home] 回第一页
[End] 到最后一页
/string 向『下』搜索 string 这个字符串,如:/abc
?string 向『上』搜索 string 这个字串,如:?abc
n, N 利用 / 或 ? 来搜索字符串时,可以用 n 来继续下一个搜索 (不论是 / 或 ?) ,可以利用 N 来进行『反向』搜索。举例来说,我以 /abc 搜索 abc 字串, 那么可以 n 继续往下查询,用 N 往上查询。若以 ?abc 向上查询 abc 字符串, 那我可以用 n 继续『向上』查询,用 N 反向查询。
q 结束这次的 man page

(表格摘自鸟哥网站,略有修改)

我们也可以修改man page的搜索路径,配置文件是:/etc/man.config

我们可以用whatis man来查看man的简单描述,我们可以看到:

whatis man
man                  (1)  - format and display the on-line manual pages
man                  (7)  - macros to format man pages
man.conf [man]       (5)  - configuration data for man
默认的man man是调用man 1 man还是man 7 man,根据man page的搜索路径(一般自上而下)

阅读(420) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~