IDEA2023.1.3破解,IDEA破解,IDEA 2023.1破解,最新IDEA激活码

Linux中的帮助命令

IDEA2023.1.3破解,IDEA破解,IDEA 2023.1破解,最新IDEA激活码

目录

  • man
  • whatis
  • apropos
  • --help
  • info
  • help

man

解释

命令名称:man
命令英文原意:manual
命令所在路径:/usr/bin/man
执行权限:所有用户
功能描述:获得帮助信息

语法

man [命令或配置文件]

示例

# 查看ls命令的帮助信息
man ls
    空格    下翻页
    pageup  上翻页
    上箭头  向上
    下箭头  向下
    /关键字 搜索(回车搜索,n往下找)


# 查看/etc/services配置文件帮助文档
man services
    提示No manual entry for services
    运行命令yum -y install man-pages,然后就可以运行了


# 查看/etc/passwd配置文件的帮助文档(不正确)
man passwd
    查询出来的命令的帮助文档,此时是不对的

whereis passwd    
[root@izm5e2q95pbpe1hh0kkwoiz ~]# whereis passwd
passwd: /usr/bin/passwd /etc/passwd /usr/share/man/man1/passwd.1.gz /usr/share/man/man5/passwd.5.gz
    passwd既有命令又有配置文件,优先显示命令的帮助文档
    1 命令的帮助文档
    5 配置文件的帮助文档

# 查看passwd配置文件的帮助文档
man 5 passwd

whatis

查看命令的简单的描述信息

示例

# 查看ls的简单的描述信息
whatis ls

[root@izm5e2q95pbpe1hh0kkwoiz ~]# whatis ls
ls (1)               - list directory contents

apropos

查看配置文件的简单的描述信息

示例

# 查看services的简单描述信息
apropos services

--help

查看某个具体命令的选项信息

示例

# 查看touch命令的具体选项信息
touch --help

[root@izm5e2q95pbpe1hh0kkwoiz ~]# touch --help
Usage: touch [OPTION]... FILE...
Update the access and modification times of each FILE to the current time.

A FILE argument that does not exist is created empty, unless -c or -h
is supplied.

A FILE argument string of - is handled specially and causes touch to
change the times of the file associated with standard output.

Mandatory arguments to long options are mandatory for short options too.
  -a                     change only the access time
  -c, --no-create        do not create any files
  -d, --date=STRING      parse STRING and use it instead of current time
  -f                     (ignored)
  -h, --no-dereference   affect each symbolic link instead of any referenced
                         file (useful only on systems that can change the
                         timestamps of a symlink)
  -m                     change only the modification time
  -r, --reference=FILE   use this file's times instead of current time
  -t STAMP               use [[CC]YY]MMDDhhmm[.ss] instead of current time
      --time=WORD        change the specified time:
                           WORD is access, atime, or use: equivalent to -a
                           WORD is modify or mtime: equivalent to -m
      --help     display this help and exit
      --version  output version information and exit

Note that the -d and -t options accept different time-date formats.

GNU coreutils online help: <http://www.gnu.org/software/coreutils/>
For complete documentation, run: info coreutils 'touch invocation'


info

使用方法跟man 几乎一致, 显示的信息也大同小异

help

解释

命令名称:help
命令所在路径:shell内置命令(无法通过which查找路径,无法通过man查看帮助文档)
执行权限:所有用户
功能描述:获得shell内置命令的帮助信息

语法

help [命令]

示例

# 使用man查看shell内置命令(无法查看正确的帮助信息)
man cd

NAME
       bash,  :,  .,  [,  alias, bg, bind, break, builtin, caller, cd, command, compgen, complete, compopt, continue,
       declare, dirs, disown, echo, enable, eval, exec, exit, export, false, fc, fg, getopts,  hash,  help,  history,
       jobs,  kill, let, local, logout, mapfile, popd, printf, pushd, pwd, read, readonly, return, set, shift, shopt,
       source, suspend, test, times, trap, true, type, typeset, ulimit, umask, unalias, unset, wait -  bash  built-in
       commands, see bash(1)
......

# man 查询cd查不出来正确的帮助文档信息,相反查出来的是shell的内置命令



# 正确查看shell内置命令的帮助文档信息,查看umask
help umask

[root@izm5e2q95pbpe1hh0kkwoiz ~]# help umask
umask: umask [-p] [-S] [mode]
    Display or set file mode mask.

    Sets the user file-creation mask to MODE.  If MODE is omitted, prints
    the current value of the mask.

    If MODE begins with a digit, it is interpreted as an octal number;
    otherwise it is a symbolic mode string like that accepted by chmod(1).

    Options:
      -p        if MODE is omitted, output in a form that may be reused as input
      -S        makes the output symbolic; otherwise an octal number is output

    Exit Status:
    Returns success unless MODE is invalid or an invalid option is given.


文章永久链接:https://tech.souyunku.com/?p=46380


Warning: A non-numeric value encountered in /data/wangzhan/tech.souyunku.com.wp/wp-content/themes/dux/functions-theme.php on line 1154
赞(65) 打赏



未经允许不得转载:搜云库技术团队 » Linux中的帮助命令

IDEA2023.1.3破解,IDEA破解,IDEA 2023.1破解,最新IDEA激活码
IDEA2023.1.3破解,IDEA破解,IDEA 2023.1破解,最新IDEA激活码

评论 抢沙发

大前端WP主题 更专业 更方便

联系我们联系我们

觉得文章有用就打赏一下文章作者

微信扫一扫打赏

微信扫一扫打赏


Fatal error: Uncaught Exception: Cache directory not writable. Comet Cache needs this directory please: `/data/wangzhan/tech.souyunku.com.wp/wp-content/cache/comet-cache/cache/https/tech-souyunku-com/index.q`. Set permissions to `755` or higher; `777` might be needed in some cases. in /data/wangzhan/tech.souyunku.com.wp/wp-content/plugins/comet-cache/src/includes/traits/Ac/ObUtils.php:367 Stack trace: #0 [internal function]: WebSharks\CometCache\Classes\AdvancedCache->outputBufferCallbackHandler() #1 /data/wangzhan/tech.souyunku.com.wp/wp-includes/functions.php(5109): ob_end_flush() #2 /data/wangzhan/tech.souyunku.com.wp/wp-includes/class-wp-hook.php(303): wp_ob_end_flush_all() #3 /data/wangzhan/tech.souyunku.com.wp/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters() #4 /data/wangzhan/tech.souyunku.com.wp/wp-includes/plugin.php(470): WP_Hook->do_action() #5 /data/wangzhan/tech.souyunku.com.wp/wp-includes/load.php(1097): do_action() #6 [internal function]: shutdown_action_hook() #7 {main} thrown in /data/wangzhan/tech.souyunku.com.wp/wp-content/plugins/comet-cache/src/includes/traits/Ac/ObUtils.php on line 367