获取帮助命令
? whatis
???? 基于數(shù)據(jù)庫的查找,查找內(nèi)容比較慢
???????? 優(yōu)點:查找速度快
???????? 缺點:沒有實時性
? ? ? 數(shù)據(jù)庫文件
???????? Centos6:/var/cache/man/whatis
???????? Centos7:/var/cache/man/index.db
???? 更新數(shù)據(jù)庫文件
???????? Centos6:makewhatis
???????? Centos7:mandb
? ?? help
? ? help是一個內(nèi)部命令,help命令只能顯示shell內(nèi)部的命令幫助信息。而對于外部命令的幫助信息只能使用man或者info命令查看
?
[root@localhost ~]# type help help is a shell builtin? ? help cd ?? //查看cd的幫助
[root@localhost ~]# help cd cd: cd [-L|[-P [-e]]] [dir]Change the shell working directory.Change the current directory to DIR. The default DIR is the value of theHOME shell variable.The variable CDPATH defines the search path for the directory containingDIR. Alternative directory names in CDPATH are separated by a colon (:).A null directory name is the same as the current directory. If DIR beginswith a slash (/), then CDPATH is not used.If the directory is not found, and the shell option `cdable_vars' is set,the word is assumed to be a variable name. If that variable has a value,its value is used for DIR.Options:-L force symbolic links to be followed-P use the physical directory structure without following symboliclinks-e if the -P option is supplied, and the current working directorycannot be determined successfully, exit with a non-zero statusThe default is to follow symbolic links, as if `-L' were specified.Exit Status:Returns 0 if the directory is changed, and if $PWD is set successfully when-P is used; non-zero otherwise.help pwdhelp enablels --helpman ? ?
中文man使用方法:
???? 1.? 掛載光盤
???? mount /dev/cdrom /media/
???? 2.? 安裝中文man的軟件包
???? rpm -ivh /media/Packages/man-pages-zh-CN-1.5.2-4.el7.noarch.rpm
? ? 3. 將中文man的路徑寫的man的配置文件
? ? ? ?? gedit /etc/man_db.conf 增加一行,內(nèi)容如下
???????? MANDATORY_MANPATH??????????? /usr/share/man/zh_CN
???? 4.man -a ls? 查看ls
? q退出man命令
??? man的使用
???? f向下翻一頁
???? b向上翻一頁
???? d向下翻半頁
???? u向上翻半頁
???? ** G 跳至尾頁
???? ** g 跳至首頁
???? ** 搜索關(guān)鍵字 
???????? /關(guān)鍵字? n 向下? N向上
???????? ?關(guān)鍵字? n 向上? 
???? q 退出man
??? man的章節(jié),man的關(guān)鍵字有多個文件與之匹配,則按類型,劃分為以下9個章節(jié)
????? * 1?? Executable programs or shell commands
??????? 2?? System calls (functions provided by the kernel)
??????? 3?? Library calls (functions within program libraries)
??????? 4?? Special files (usually found in /dev)
????? * 5?? File formats and conventions eg /etc/passwd
??????? 6?? Games
??????? 7?? Miscellaneous (including macro packages and conventions), e.g. man(7), groff(7)
????? * 8?? System administration commands (usually only for root)
??????? 9?? Kernel routines [Non standard]
??? man 章節(jié)號 關(guān)鍵字 (若省略章節(jié)號,則顯示數(shù)字較小的章節(jié))
??? man -a 關(guān)鍵字?? 依次查看指定關(guān)鍵字的所有章節(jié)
[root@localhost ~]# man -a issue ISSUE(5) Linux Programmer's Manual ISSUE(5) NAMEissue - prelogin message and identificationfile DESCRIPTIONThe file /etc/issue is a text file which con‐tains a message or system identification to beprinted before the login prompt. It may con‐tain various @char and \char sequences, if sup‐ported by the getty-type program employed onthe system. FILES/etc/issue SEE ALSOmotd(5), agetty(8), mingetty(8)?
???? man -w 關(guān)鍵字 查看關(guān)鍵字匹配到的第一個章節(jié)的來源文件
???? man -aw 關(guān)鍵字 查看關(guān)鍵字匹配到的所有章節(jié)的來源文件
???? man -f 關(guān)鍵字 等于 whatis 關(guān)鍵字
轉(zhuǎn)載于:https://www.cnblogs.com/f-h-j-11-7/p/9311897.html
總結(jié)
                            
                        - 上一篇: java 可能尚未初始化变量,java
 - 下一篇: python ppt自动生成目录_利用p