Linux命令:help
语法
help: help [-dms] [模式 ...]
显示内建命令的相关信息。
显示内建命令的简略信息。如果指定了 PATTERN 模式,给出所有匹配 PATTERN 模式的命令的详细帮助,否则打印一个帮助主题列表。
选项:
-d description。只打印每个主题的功能的简要描述。
-m 以man样式打印帮助。
-s short。只打印语法部分。
说明
一般我们常用的是help跟一个命令,其实help可以用pattern来打印多个命令的用法。用法分两部分,一个是语法,一个含义或功能说明。分别用-s和-d表示。
help help
help: help [-dms] [pattern ...]
Display information about builtin commands. Displays brief summaries of builtin commands. If PATTERN is
specified, gives detailed help on all commands matching PATTERN,
otherwise the list of help topics is printed. Options:
-d output short description for each topic
-m display usage in pseudo-manpage format
-s output only a short usage synopsis for each topic matching
PATTERN Arguments:
PATTERN Pattern specifiying a help topic Exit Status:
Returns success unless PATTERN is not found or an invalid option is given.
举例
以下均以cd为例。
只打印语法部分
[root@gm ~]# help -d cd
cd - Change the shell working directory.
只打印作用说明部分
[root@gm ~]# help -s cd
cd: cd [-L|[-P [-e]]] [dir]
模拟man样式打印
[root@gm ~]# help -m cd
NAME
cd - Change the shell working directory. SYNOPSIS
cd [-L|[-P [-e]]] [dir] DESCRIPTION
Change the shell working directory. Change the current directory to DIR. The default DIR is the value of the
HOME shell variable. The variable CDPATH defines the search path for the directory containing
DIR. Alternative directory names in CDPATH are separated by a colon (:).
A null directory name is the same as the current directory. If DIR begins
with 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 symbolic
links
-e if the -P option is supplied, and the current working directory
cannot be determined successfully, exit with a non-zero status The default is to follow symbolic links, as if `-L' were specified. Exit Status:
Returns if the directory is changed, and if $PWD is set successfully when
-P is used; non-zero otherwise. SEE ALSO
bash() IMPLEMENTATION
GNU bash, version 4.2.()-release (x86_64-redhat-linux-gnu)
Copyright (C) Free Software Foundation, Inc.
License GPLv3+: GNU GPL version or later <http://gnu.org/licenses/gpl.html>
打印多个命令帮助。
[root@gm ~]# help -s read*
Shell commands matching keyword `read*' read: read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p prompt] [-t timeout] [-u fd] [name ...]
readarray: readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]
readonly: readonly [-aAf] [name[=value] ...] or readonly -p
Linux命令:help的更多相关文章
- Linux实战教学笔记04:Linux命令基础
第四节:Linux命令基础 标签(空格分隔):Linux实战教学笔记 第1章 认识操作环境 root:当前登陆的用户名 @分隔符 chensiqi:主机名 -:当前路径位置 用户的提示符 1.1 Li ...
- 像黑客一样使用 Linux 命令行
前言 之前在博客园看到一篇介绍 IntelliJ IDEA 配置的文章,它里面用的是 gif 动态图片进行展示,我觉得很不错.所以在我今天以及以后的博文中,我也会尽量使用 gif 动图进行展示.制作 ...
- 11 个很少人知道但很有用的 Linux 命令
Linux命令行吸引了大多数Linux爱好者.一个正常的Linux用户一般掌握大约50-60个命令来处理每日的任务.Linux命令和它们的转换对于Linux用户.Shell脚本程序员和管理员来说是最有 ...
- Linux命令随笔
Linux命令总结 man ==命令帮助; help ==命令的帮助(bash的内置命令); ls ==list,查看目录列表; -ld:查看目录权限; -l:(long)长格式显示属性; -F:给不 ...
- linux命令在线手册
下面几个网址有一些 Linux命令的在线手册,而且还是中文的,还可以搜索.非常方便 Linux命令手册 Linux命令大全 Linux中文man在线手册 每日一linux命令
- 常用的一些linux命令
最近接触到一些linux环境部署的事情,下面分享一些最近使用的比较频繁的一些linux命令~ 1.一次性移动多个文件到一个文件夹里 mv 被移动文件名 -t 目标文件夹 如:mv a.txt b.t ...
- 测试或运维工作过程中最常用的几个linux命令?
大家在测试工作过程中,可能会遇到需要你去服务器修改一些配置文件,譬如说某个字段的值是1 则关联老版本,是0则关联新版本,这时候你可能就需要会下vi的命令操作:或者查看session设置的时长,可能需 ...
- 每天一个 Linux 命令(21):find命令之xargs
在使用 find命令的-exec选项处理匹配到的文件时, find命令将所有匹配到的文件一起传递给exec执行.但有些系统对能够传递给exec的命令长度有限制,这样在find命令运行几分钟之后,就会出 ...
- 在windows下使用linux命令,GnuWin32的使用.
http://sourceforge.net/projects/getgnuwin32 使用过linxu的伙计估计都会喜欢上linux各种各样强大的命令如:grep, sed,awk,diff和pat ...
- 我常用的那些linux命令
我常用的那些linux命令 用linux也有些年头了,说来也忏愧,说是有些年头了,其实也还是个不长进的主.记得第一次接触linux是boss跟我说的怎么操作,什么编辑模式,按i,a,o进入编辑模式.在 ...
随机推荐
- gerrit工具的数据提交流程
检查服务器有没有更新:1.检查服务器有没有更新git fetch如果有内容,代表服务器版本有更新,需要把本机修改暂存(第二步),拉下服务器内容(第三步)如果没有内容,代表服务器没有更新,跳至52.本地 ...
- Spring boot配置logback
在application-dev.yml增加配置 配置文件的路径为 rescoures/evn/dev/logback-spring.xml <?xml version="1.0&qu ...
- Linux中安装nodejs及插件
Linux中安装nodejs及插件 1.去官网下载安装包 英文网址:https://nodejs.org/en/download/ 中文网址:http://nodejs.cn/download/ 通过 ...
- debian shell脚本关联
懒得命令行一个个的输 设置,MIME类型编辑,搜索x-shellscript,默认的改成/bin/bash即可
- ssh:22端口拒绝服务
在Hadoop配置中,被这个问题坑的死去活来的.总结一下,注意以下几点: 1.sshd是否启动.一般你ssh loaclhost的时候22端口拒绝,就很有可能是这个问题了. 手动打开:/etc/ini ...
- Javascript小问题
1.原生对象克隆 var clone = function(obj) { var o; if (typeof obj == "object") { if (obj === null ...
- multipart/form-data和application/x-www-form-urlencoded区别
FORM元素的enctype属性指定了表单数据向服务器提交时所采用的编码类型.例如: application/x-www-form-urlencoded: 窗体数据被编码为名称/值对.这是标准的编码格 ...
- nvidia驱动自动更新版本后问题解决 -- failed to initialize nvml: driver/library version mismatch
因为必须关闭桌面窗口, 建议另外一台电脑ssh连接操作 1. 卸载旧版本并关闭图形界面 sudo apt-get remove --purge nvidia-\* sudo service light ...
- Unity Input,生命周期,Light,获取组件
1. 递归方法遍历获取指定子物体 知识点:递归的使用:transform.childCount.GetChild(index) 2. Input输入控制类,检测玩家输入 知识点: Input ...
- Sysbench 1.0.17安装与测试
Sysbench安装与测试 1.安装: cd /usr/local/src wget https://codeload.github.com/akopytov/sysbench/tar.gz/1.0. ...