shell命令--help


shell命令--help

0、help命令的專屬圖床

點此快速打開文章圖床_shell命令help

1、help命令的功能說明

​ 在 Linux 系統里有一些特殊的命令 ,它們就是 bash程序的內置命令 ,例如 cdhistoryread 等 ,這些命令在系統目錄里不存在真實的程序文件(存在於 bash 程序里 ),對於這部分命令,查看幫助的方法就是使用 help 命令。

2、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.

3、help命令的選項說明

help 選項不常用,此處省略。

4、help命令的實踐操作

范例1:使用 help 查看 cd 命令

help cd

范例2:使用 man 查看 cd 命令

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)

『MineGi有話說』:快來掃一掃下面鏈接的二維碼,加入我們吧!


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM