[Tab]按键
他具有【命令补全】(接在一串指令的第一个字后面)与【档案补齐】(接在第一串指令的第二字以后时)的功能。如
[KANO@kelvin ~]$ ca[tab][tab] cabextract cache_metadata_size cal canberra-boot capsh case cacertdir_rehash cache_repair ca-legacy canberra-gtk-play captoinfo cat cache_check cache_restore california cancel card_eventmgr catchsegv cache_dump cairo-sphinx caller cancel.cups caribou-preferences catman [KANO@kelvin ~]$ ls -al ~/.bash[tab][tab] .bash_history .bash_logout .bash_profile .bashrc
[ctrl]-c按键
指令串终止。注:如果在运行比较重要的指令时,慎用。
[ctrl]-d按键
代表着【键盘输入结束(End of File,EOF或者End of Input)】的意思。另外他也可以取代exit的输入。
man page
如不知道如何使用date这个指令,就可用man来寻找说明的内容。(man就是manual(操作说明)的简写)
[KANO@kelvin ~]$ man date DATE() User Commands DATE() NAME date - print or set the system date and time SYNOPSIS date [OPTION]... [+FORMAT] date [-u|--utc|--universal] [MMDDhhmm[[CC]YY][.ss]] DESCRIPTION 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' -f, --file=DATEFILE like --date once for each line of DATEFILE -I[TIMESPEC], --iso-[=TIMESPEC] output format. TIMESPEC='date' for date only (the default), 'hours', 'minutes', 'seconds', or 'ns' for date and time to the indicated precision. ..........................略............................. AUTHOR Written by David MacKenzie. COPYRIGHT Copyright © Free Software Foundation, Inc. License GPLv3+: GNU GPL version or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. SEE ALSO The full documentation for date is maintained as a Texinfo manual. If the info and date programs are properly installed at your site, the command info coreutils 'date invocation' should give you access to the complete manual. GNU coreutils DATE()
在上面的说明第一行有个【DATE(1)】,DATE是指令名称,(1)则代表【一般使用者可使用的指令】。
代号 | 代表内容 |
1 | 使用者可以操作的指令或可执行文件 |
2 | 系统核心可呼叫的函数与工具等 |
3 | 一些常用的函数(function)与函式库(library) |
4 | 装置档案的说明 |
5 | 设定档或者是某些档案的格式 |
6 | 游戏(game) |
7 |
惯例与协议等,例如linux标准档案系统、网络协议、ASCII code 等等的说明内容 |
8 | 系统管理员可用的管理指令 |
9 | 跟kernel有关的文件 |
再来,man page的内容也大抵分成如下几个部分
代号 | 内容说明 |
NAME | 简短的指令、数据名称说明 |
SYNOPSIS | 简短的指令下达语法(syntax)简介 |
DESCRIPTION | 较为完整的说明,这部分最好仔细看看 |
OPTIONS | 针对SYNOPSIS部分中,有列举的所有可用的参数说明 |
COMMANDS | 当这个程序(软件)在执行的时候,可以在此程序(软件)中下达的指令 |
FILES | 这个程序或数据所使用或参考或连结到的某些档案 |
SEE ALSO |
可以参考的,跟这个指令或数据有关的其它说明! |
EXAMPLE | 一些可以参考的范例 |
BUGS | 是否有相关的bug |
如果向下翻页可以按键盘的空格键,也可以使用[page up]与[page down]来翻页,甚至时[↑][↓]换行。同时,如果知道某些关键词,还可以在任何时候输入[/word],来主动搜寻关键词。最后,如果要离开man page,直接按下[q]就能离开。
按键 | 进行工作 |
空格键 | 向下翻一页 |
[page down] | 向下翻一页 |
[page up] | 向上翻一页 |
[home] | 去到第一页 |
[end] | 去到最后一页 |
/string | 向【下】搜寻string这个字符串 |
?string | 向【上】搜寻string这个字符串 |
n,N |
利用/或?来搜寻字符串时。可以用n来继续下一个搜寻(不论是/或?), 可以利用N进行【反向】搜寻。 |
q | 结束这次man page |
通常man page的数据放在/usr/share/man这个目录里头,虽然不同的distribution可能有点差异性。然而我们可以通过修改他的man page搜寻路径来改善这个目录的问题。修改/etc/man.config(有的版本为man.conf或manpath.conf)即可。
如果还想要知道更多跟man有关的信息,可以:
[KANO@kelvin ~]$ man -f man ) - 在线参考手册的接口 ) - macros to format man pages man (1p) - display system documentation
上表中的两个man可以这样将文件叫出来:
[KANO@kelvin ~]$ man [KANO@kelvin ~]$ man
此外,还可以利用【关键词】找到更多说明文件。例如
[KANO@kelvin ~]$ man -k man
利用关键词将说明文件里面只要含有man这个字眼的(不一定是完整字符串)就将他取出来。
事实上,还有两个指令跟man page有关。
[KANO@kelvin ~]$ whatis [指令或者是数据]<==相当于man -f [KANO@kelvin ~]$ apropos [指令或者是数据]<==相当于man -k
info page
info跟man差不多。支持info指令的文件是放置在/usr/share/info/这个目录当中的。
[KANO@kelvin ~]$ info info File: info.info, Node: Top, Next: Getting Started, Up: (dir) Info: An Introduction ********************* The GNU Project distributes most of its on-line manuals in the "Info format", which you read using an "Info reader". You are probably using an Info reader to read this now. There are two primary Info readers: 'info', a stand-alone program designed just to read Info files (*note What is Info?: (info-stnd)Top.), and the 'info' package in GNU Emacs, a general-purpose editor. At present, only the Emacs reader supports using a mouse. If you are new to the Info reader and want to learn how to use it, type the command 'h' now. It brings you to a programmed instruction sequence. --zz-Info:( 行 --Top---------------------------------------------------------------------------------------------------------------------------- 欢迎使用 Info 5.2 版。输入 h 以获得帮助,m 将得到菜单。
最后一行显示出目前的info这个程序的版本信息,可以按下m这个按键,就可以有更多指令说明。输入[n],就可以跑到下一层,也就是getting started那个章节。
info page的按键可以整理成
按键 | 进行工作 |
空格键 | 向下翻页 |
[page down] | 向下翻页 |
[page up] | 向上翻页 |
[tab] | 在node之间移动,有node的地方,通常会以*显示 |
[enter] | 当光标在node上面时,按下enter可以进入该node |
b | 移动光标到该info画面当中的第一个node处 |
e | 移动光标到该info画面当中的最后一个node处 |
n | 前往下一个info page处 |
p | 前往上一个info page处 |
u | 向上移动一层 |
s(/) | 在info page当中进行搜寻 |
h | 显示求助选单 |
? | 指令一览表 |
q | 结束这次info page |
其他有用的文件(documents)
毕竟不是每个程序都需要做成在线说明文件的,还有相当多的说明需要额外文件。还有某些软件不只告诉你【如何做】,还有有些相关的原理会说明。那么这些文件就是摆在目录/usr/share/doc里。