首页 > 系统服务 > 详细

linux查看命令帮助的方法

时间:2018-06-06 00:50:08      阅读:296      评论:0      收藏:0      [点我收藏+]
1.使用man命令查看
栗子:

 [root@Alibaba ~]# man cd

执行man命后的帮助信息简介:

帮助标题 功能说明
NAME 命令说明及介绍
SYNOPSIS 基本使用语法
DESCRIPTION 参数选项说明

man帮助页面快捷键

快捷键 功能说明
/string 向下搜索string字符串
?string 向上搜索string字符串
n,N 当使用"/"或"?"搜索 字符串时,n继续按相同方向查询,N则按照反向查询。例子:/string 向下查找string,输入n则继续向下查找string,输入N则向上查找string。?string向上查找string,输入n则继续向上查找,输入N则向下查找string
q 结束本次man帮助

3.2.使用--help参数查看

使用"命令 --help"可以查看简短的命令帮助信息。

[root@Alibaba ~]# mkdir --help
Usage: mkdir [OPTION]... DIRECTORY...
Create the DIRECTORY(ies), if they do not already exist.
Mandatory arguments to long options are mandatory for short options too.
  -m, --mode=MODE   set file mode (as in chmod), not a=rwx - umask
  -p, --parents     no error if existing, make parent directories as needed
  -v, --verbose     print a message for each created directory
  -Z, --context=CTX  set the SELinux security context of each created

3.使用help命令查看bash内置命令
help命令只能查看bash内置的命令。

[root@Alibaba ~]# help cd
cd: cd [-L|-P] [dir]
    Change the shell working directory.

linux查看命令帮助的方法

原文:http://blog.51cto.com/11867391/2125332

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!