• Linux命令(126)之help


    linux命令之help

    1.help介绍

    linux命令help用来显示内置命令的帮助信息

    2.help用法

    help [参数] command

    help参数
    参数说明
    -d输出每个命令的简短描述
    -m以手册页格式显示命令用法
    -s仅输出每个匹配命令的简短使用概要

    3.实例

    3.1.以手册页格式显示命令用法

    命令:

    help -m

    1. [root@rhel77 ~]# help -m
    2. GNU bash, version 4.2.46(2)-release (x86_64-redhat-linux-gnu)
    3. These shell commands are defined internally. Type `help' to see this list.
    4. Type `help name' to find out more about the function `name'.
    5. Use `info bash' to find out more about the shell in general.
    6. Use `man -k' or `info' to find out more about commands not in this list.
    7. A star (*) next to a name means that the command is disabled.
    8. job_spec [&] history [-c] [-d offset] [n] or history -anrw [file>
    9. (( expression )) if COMMANDS; then COMMANDS; [ elif COMMANDS; then C>
    10. . filename [arguments] jobs [-lnprs] [jobspec ...] or jobs -x command [arg>
    11. : kill [-s sigspec | -n signum | -sigspec] pid | jobs>
    12. [ arg... ] let arg [arg ...]
    13. [[ expression ]] local [option] name[=value] ...
    14. alias [-p] [name[=value] ... ] logout [n]
    15. bg [job_spec ...] mapfile [-n count] [-O origin] [-s count] [-t] [-u >
    16. bind [-lpvsPVS] [-m keymap] [-f filename] [-q name] > popd [-n] [+N | -N]
    17. break [n] printf [-v var] format [arguments]
    18. builtin [shell-builtin [arg ...]] pushd [-n] [+N | -N | dir]
    19. caller [expr] pwd [-LP]
    20. case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]..> read [-ers] [-a array] [-d delim] [-i text] [-n nch>
    21. cd [-L|[-P [-e]]] [dir] readarray [-n count] [-O origin] [-s count] [-t] [->
    22. command [-pVv] command [arg ...] readonly [-aAf] [name[=value] ...] or readonly -p
    23. compgen [-abcdefgjksuv] [-o option] [-A action] [-G> return [n]
    24. complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A> select NAME [in WORDS ... ;] do COMMANDS; done
    25. compopt [-o|+o option] [-DE] [name ...] set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg>
    26. continue [n] shift [n]
    27. coproc [NAME] command [redirections] shopt [-pqsu] [-o] [optname ...]
    28. declare [-aAfFgilrtux] [-p] [name[=value] ...] source filename [arguments]
    29. dirs [-clpv] [+N] [-N] suspend [-f]
    30. disown [-h] [-ar] [jobspec ...] test [expr]
    31. echo [-neE] [arg ...] time [-p] pipeline
    32. enable [-a] [-dnps] [-f filename] [name ...] times
    33. eval [arg ...] trap [-lp] [[arg] signal_spec ...]
    34. exec [-cl] [-a name] [command [arguments ...]] [redi> true
    35. exit [n] type [-afptP] name [name ...]
    36. export [-fn] [name[=value] ...] or export -p typeset [-aAfFgilrtux] [-p] name[=value] ...
    37. false ulimit [-SHacdefilmnpqrstuvx] [limit]
    38. fc [-e ename] [-lnr] [first] [last] or fc -s [pat=re> umask [-p] [-S] [mode]
    39. fg [job_spec] unalias [-a] name [name ...]
    40. for NAME [in WORDS ... ] ; do COMMANDS; done unset [-f] [-v] [name ...]
    41. for (( exp1; exp2; exp3 )); do COMMANDS; done until COMMANDS; do COMMANDS; done
    42. function name { COMMANDS ; } or name () { COMMANDS ;> variables - Names and meanings of some shell variab>
    43. getopts optstring name [arg] wait [id]
    44. hash [-lr] [-p pathname] [-dt] [name ...] while COMMANDS; do COMMANDS; done
    45. help [-dms] [pattern ...] { COMMANDS ; }
    46. [root@rhel77 ~]#

    3.2.输出内置命令的简短描述

    命令:

    help -d fg

    1. [root@rhel77 ~]# help -d fg
    2. fg - Move job to the foreground.
    3. [root@rhel77 ~]#

    3.3.仅输出内置命令的简短使用概要

    命令:

    help -s fg

    1. [root@rhel77 ~]# help -s fg
    2. fg: fg [job_spec]
    3. [root@rhel77 ~]#

    3.4.显示help命令的用法

    命令:

    help help

    1. [root@rhel77 ~]# help help
    2. help: help [-dms] [pattern ...]
    3. Display information about builtin commands.
    4. Displays brief summaries of builtin commands. If PATTERN is
    5. specified, gives detailed help on all commands matching PATTERN,
    6. otherwise the list of help topics is printed.
    7. Options:
    8. -d output short description for each topic
    9. -m display usage in pseudo-manpage format
    10. -s output only a short usage synopsis for each topic matching
    11. PATTERN
    12. Arguments:
    13. PATTERN Pattern specifiying a help topic
    14. Exit Status:
    15. Returns success unless PATTERN is not found or an invalid option is given.
    16. [root@rhel77 ~]#

  • 相关阅读:
    【安全体系架构】——零信任网络架构
    【Master公式】对于这一类符合的递归可以直接确定时间复杂度
    安全狗核心产品入选《云原生产品目录》云原生安全实力备受认可!
    2022,开发转测试,会不会后悔?
    多模块打包报错找不到包的问题
    【开发工具】idea 的全局搜索快捷键(Ctrl+shift+F)失效
    假冒 Skype 应用程序网络钓鱼分析
    leetcode hot100【LeetCode 279. 完全平方数】java实现
    pycharm添加pyside6插件
    idea默认带的equals和hashcode引起的bug
  • 原文地址:https://blog.csdn.net/z19861216/article/details/134454785