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进入编辑模式.在 ...
随机推荐
- IAR project build with command line
The simple way is that using iarbuild.exe project.eww -build Release/Debug Release/Debug is the con ...
- Windows batch file
Echo off @ECHO OFF echo string to generate the output create a blank line echo . create a file echo ...
- tomcat 闪退问题排查
由于启动tomcat回出现闪退情况,看不到异常 解决方法: 一. 打开startup.bat文件,在最下面 在文本的最后敲上pause,保存后重新运行startup.bat,这时候窗口会留在桌面上(调 ...
- HttpWebResponse Post 前端控件数据,后台如何接收?
MVC视图页: @{ Layout = null; } <!DOCTYPE html> <html> <head> <title>test</ti ...
- Lubuntu下安装Python3.6
Lubuntu下系统自带的Python版本是2.X,由于开发环境要求Python3,于是我们安装Python3.6 1.在终端输入以下命令: sudo add-apt-repository ppa:j ...
- IE6设置li的float:left,不能自适应宽的解决方法
原文地址:https://blog.csdn.net/u012299002/article/details/50589453 做个divcss页面,发现在IE6下,设置了li的float:left,L ...
- 爬虫系列4:Requests+Xpath 爬取动态数据
爬虫系列4:Requests+Xpath 爬取动态数据 [抓取]:参考前文 爬虫系列1:https://www.cnblogs.com/yizhiamumu/p/9451093.html [分页]:参 ...
- connected standby
参考链接 https://docs.microsoft.com/en-us/windows-hardware/design/device-experiences/modern-standby http ...
- Nginx+Memcache+一致性hash算法 实现页面分布式缓存(转)
网站响应速度优化包括集群架构中很多方面的瓶颈因素,这里所说的将页面静态化.实现分布式高速缓存就是其中的一个很好的解决方案... 1)先来看看Nginx负载均衡 Nginx负载均衡依赖自带的 ngx_h ...
- mpvue
使用mpvue开发小程序 首先安装 我们使用@vue/cli 无法使用vue init 可以全局安装一个@vue/cli-init npm install -g @vue/cli-init 然后初始化 ...