获取帮助命令

  whatis
     基于数据库的查找,查找内容比较慢
         优点:查找速度快
         缺点:没有实时性

[root@localhost ~]# whatis ls
ls (1)               - list directory contents
ls (1p)              - list directory contents

      数据库文件

         Centos6:/var/cache/man/whatis
         Centos7:/var/cache/man/index.db
     更新数据库文件
         Centos6:makewhatis
         Centos7:mandb

     help

    help是一个内部命令,help命令只能显示shell内部的命令帮助信息。而对于外部命令的帮助信息只能使用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 --help

man    

中文man使用方法:
     1.  挂载光盘
     mount /dev/cdrom /media/
     2.  安装中文man的软件包
     rpm -ivh /media/Packages/man-pages-zh-CN-1.5.2-4.el7.noarch.rpm

[root@localhost ~]# mount /dev/cdrom /media/
mount: /dev/sr0 is write-protected, mounting read-only
[root@localhost ~]# rpm -ivh /media/Packages/screen-4.1.0-0.25.20120314git3c2946.el7.x86_64.rpm 
warning: /media/Packages/screen-4.1.0-0.25.20120314git3c2946.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...1:screen-4.1.0-0.25.20120314git3c29################################# [100%

    3. 将中文man的路径写的man的配置文件

         gedit /etc/man_db.conf 增加一行,内容如下
         MANDATORY_MANPATH            /usr/share/man/zh_CN
     4.man -a ls  查看ls

[root@localhost ~]# man -a ls
 LS(1)                User Commands               LS(1)
NAMEls - list directory contents
SYNOPSISls [OPTION]... [FILE]...
DESCRIPTIONList  information  about the FILEs (the currentdirectory by default).  Sort entries alphabeti‐cally if none of -cftuvSUX nor --sort is speci‐fied.

  q退出man命令

    man的使用
     f向下翻一页
     b向上翻一页
     d向下翻半页
     u向上翻半页
     ** G 跳至尾页
     ** g 跳至首页
     ** 搜索关键字
         /关键字  n 向下  N向上
         ?关键字  n 向上 
     q 退出man

    man的章节,man的关键字有多个文件与之匹配,则按类型,划分为以下9个章节
      * 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 章节号 关键字 (若省略章节号,则显示数字较小的章节)

    man -a 关键字   依次查看指定关键字的所有章节

[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 关键字 查看关键字匹配到的第一个章节的来源文件
     man -aw 关键字 查看关键字匹配到的所有章节的来源文件
     man -f 关键字 等于 whatis 关键字

转载于:https://www.cnblogs.com/f-h-j-11-7/p/9311897.html

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/279867.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

笔记本电脑升级固态硬盘好吗_如何升级笔记本电脑硬盘

笔记本电脑升级固态硬盘好吗Upgrading your laptop’s hard drive is a great way to get some extra life out of an old machine (or resurrect a dead one). Read on as we walk you through the prep work, the installation, and the followup. 升级笔记本电脑的硬盘驱动器…

购物单

小明刚刚找到工作,老板人很好,只是老板夫人很爱购物。老板忙的时候经常让小明帮忙到商场代为购物。小明很厌烦,但又不好推辞。 这不,XX大促销又来了!老板夫人开出了长长的购物单,都是有打折优惠的。 …

Seay源代码审计系统

这是一款基于C#语言开发的一款针对PHP代码安全性审计的系统,主要运行于Windows系统上。这款软件能够发现SQL注入、代码执行、命令执行、文件包含、文件上传、绕过转义防护、拒绝服务、XSS跨站、信息泄露、任意URL跳转等漏洞。 下载链接 https://pan.baidu.com/s/1V…

dotnet 世界猜测 随机数的小测试

这是一个半技术向的博客,主题来源于我读过的某本书的片段,这是一个稍稍有些前置知识的故事,主题的大概内容就是假定世界存在某个规则序列,通过一代代的探索,可以获取到此序列的内容。本文将模拟此情形,写一…

python 批量修改密码

下午闲来无事,就搞个批量密码修改工具玩玩... #!/usr/bin/env python import paramiko import time ip_list(ip1,ip2) log_fileopen(mpwdok.log,w) log_file1open(mpwderr.log,w) for ip in ip_list: try: s paramiko.Transport((ip, 22)) s.c…

如何在Android Wear上节省电池寿命

If you’re rocking Android on your wrist, there’s a chance you’ve learned to rely on its convenience pretty heavily. And if you’re in that position, then you probably also know how annoying it can be if your watch runs out of juice in the middle of the …

css3 伪类选择器

1.target:表示当前的url片段的元素类型,这个元素必须是E (作用类似于选项卡) 2.::before{content:“要添加的内容”} 添加到......之前 3.rgb() 颜色 4.rgba&#xf…

城市统计【BFS】

题目大意: 中山市的地图是一个n*n的矩阵,其中标号为1的表示商业区,标号为0的表示居民区。为了考察市内居民区与商业区的距离,并对此作出评估,市长希望你能够编写一个程序完成这一任务。  居民区i到商业区的距离指的是…

使用 DataAnnotations(数据注解)实现通用模型数据校验

.net 跨平台参数校验的意义在实际项目开发中,无论任何方式、任何规模的开发模式,项目中都离不开对接入数据模型参数的合法性校验,目前普片的开发模式基本是前后端分离,当用户在前端页面中输入一些表单数据时,点击提交按…

网线的做法 及 POE的介绍

网线的做法 以太网线采用差分方式传输。所谓差分方式传输,就是发送端在两条信号线上传输幅值相等相位相反的电信号,接收端对接受的两条线信号作减法运算,这样获得幅值翻倍的信号。其抗干扰的原理是:假如两条信号线都受到了同样&am…

unity 使用tile_如何使用Tile从网上查找电话

unity 使用tileTile is a fantastic little gadget that can help you find your lost keys or wallet. However, it can also locate and ring your phone, even if you never buy a single physical Tile. Here’s how to find your lost phone using the Tile app on the we…

你与一份好简历之间的距离

阅读本文大概需要 2.7 分钟。每年年初都是企业的招聘旺季,对应的三四月份绝对跳槽、找工作的好时机,业内经常称呼这两个月为金三银四。实力雄厚的人,那个月找工作问题都不大,但是也会尽量挑选个好时机,能有更多的选择。…

Python 循环删除指定文件夹下所有的.longtian类型文件

# -*- coding: utf-8 -*-import os#遍历文件夹删除文件 def traversing_dir(rootDir):#遍历根目录for root,dirs,files in os.walk(rootDir):for file in files:#文件后缀名extFileos.path.splitext(file)[1]if extFile".longtian":os.remove(os.path.join(root,file…

《ASP.NET Core 6框架揭秘实例》演示[35]:利用Session保留语境

客户端和服务器基于HTTP的消息交换就好比两个完全没有记忆能力的人在交流,每次单一的HTTP事务体现为一次“一问一答”的对话。单一的对话毫无意义,在在同一语境下针对某个主题进行的多次对话才会有结果。会话的目的就是在同一个客户端和服务器之间建立两…

Vincross孙天齐:人机界面的突破将引发科技革命

8月23—27日,世界机器人大会在北京举办,全球各国机器人领域的优秀企业悉数亮相,五花八门的机器人及产业链上下游最新技术均能在这次盛会上找到踪迹,整个会场充满了未来感与时代发展的气息。 大会中智慧城市服务机器人技术与应用专…

如何在Windows上使用64位Web浏览器

Google and Mozilla now offer 64-bit versions of Chrome and Firefox for Windows. Here’s how to find out what version you’re running and how to upgrade. Google和Mozilla现在提供适用于Windows的64位版本的Chrome和Firefox。 这是找出正在运行的版本以及如何升级的方…

立下“去O”Flag的AWS,悄悄修炼了哪些内功?

AWS re:Invent 2018大会上,AWS首席执行执行官Andy Jassy 表示到 2019 年底,亚马逊将全面放弃使用 Oracle 数据库,97%的“关键任务数据库”将运行在亚马逊自己的数据库服务上。 如今,2019年已经过去了四分之一&#xff…

static作用:静态变量的生存周期和作用域

首先要理解生存周期与作用域的区别: 生存周期: 变量从定义到销毁的时间范围。存放在全局数据区的变量的生存周期存在于整个程序运行期间,而存放在栈中的数据则随着函数等的作用域结束导致出栈而销毁,除了静态变量之外的局部变量都存放于栈中…

刘强东痛批京东高管,拿PPT骗他!网友怒了:爱用 PPT 忽悠的人,他们都遭人痛恨...

这是头哥侃码的第272篇原创因为被新冠感染,所以最近两周都在休养。前几天,我无意中看到一则有关刘强东的新闻,大致是他在京东内部管理培训会上痛批部分高管,称 “拿PPT和假大空词汇忽悠自己的人就是骗子”,表示部分高管…

关于file的部分简单命令

1.关于file的简单命令 2.创建/删除 文件/目录 ## -f和-r可以连用,表示强制删除 3.文件/目录的复制 ##复制是一个新建的过程,在保持原有不变的基础上重新再建立一个 4.文件/目录的移动 ##移动是一个重命名的过程,但不改变其中的内容 本文转自…