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进入编辑模式.在 ...
随机推荐
- python-闭包函数
在函数编程中经常用到闭包.闭包是什么,它是怎么产生的及用来解决什么问题呢.给出字面的定义先:闭包是由函数及其相关的引用环境组合而成的实体(即:闭包=函数+引用环境)(想想Erlang的外层函数传入一个 ...
- 面试题-Python高级
元类 Python 中类方法.类实例方法.静态方法有何区别? 类方法:是类对象的方法,在定义时需要在上方使用“@classmethod”进行装饰,形参为cls, 表示类对象,类对象和实例对象都可调用: ...
- 【SQLServer】附加数据库失败
一个参考:https://blog.csdn.net/zjx86320/article/details/25562361 如果类似Administrator.Everyone等都依照网上的权限改过之后 ...
- 机器学习中的train valid test以及交叉验证
转自 https://www.cnblogs.com/rainsoul/p/6373385.html 在以前的网络训练中,有关于验证集一直比较疑惑,在一些机器学习的教程中,都会提到,将数据集分为三部分 ...
- kettle无法更新数据库字段解决办法
刚开始使用kettle,遇到一个问题, 在编写一个转换流程时,如果所操作的表字段名发生了变化(例如表student中id变更问userid),但是在kettle中使用时仍然显示是id,如下图, 此时清 ...
- maven向本地仓库导入jar包
如果maven工程的依赖jar包在网上找不到,那么只能自己打包,然后传到本地仓库,可以使用如下命令 mvn install:install-file -DgroupId=com.redis.redis ...
- 《深度探索C++对象模型》读书笔记(二)
第三章:Data语意学 这一章主要讲了类中的数据在内存中是如何分配的,包括(多重)继承和多态. 让我们首先从一段代码开始: class X{}; class Y :virtual public X{} ...
- ubuntu 下安装mulval
怎么在虚拟机下安装ubuntu这里就不多说了 ubuntu怎么安装静态ip可以参考:https://www.cnblogs.com/braveym/p/8640563.html ubuntu安装jdk ...
- 来源于知乎专栏:https://zhuanlan.zhihu.com/p/29619457
1. 校验数字的表达式 1 数字:^[0-9]*$ 2 n位的数字:^\d{n}$ 3 至少n位的数字:^\d{n,}$ 4 m-n位的数字:^\d{m,n}$ 5 零和非零开头的数字:^(0|[1- ...
- Python threading(多线程)
threading模块在较低级别thread模块之上构建更高级别的线程接口. 一.threading模块定义了以下函数和对象: threading.active_count() 等同于threadin ...