列出Bash內建的所有指令與敘述:help -d '*'
- % - Resume job in foreground.
- (( ... )) - Evaluate arithmetic expression.
- . - Execute commands from a file in the current shell.
- : - Null command.
- [ - Evaluate conditional expression.
- [[ ... ]] - Execute conditional command.
- alias - Define or display aliases.
- bg - Move jobs to the background.
- bind - Set Readline key bindings and variables.
- break - Exit for, while, or until loops.
- builtin - Execute shell builtins.
- caller - Return the context of the current subroutine call.
- case - Execute commands based on pattern matching.
- cd - Change the shell working directory.
- command - Execute a simple command or display information about commands.
- compgen - Display possible completions depending on the options.
- complete - Specify how arguments are to be completed by Readline.
- compopt - Modify or display completion options.
- continue - Resume for, while, or until loops.
- coproc - Create a coprocess named NAME.
- declare - Set variable values and attributes.
- dirs - Display directory stack.
- disown - Remove jobs from current shell.
- echo - Write arguments to the standard output.
- enable - Enable and disable shell builtins.
- eval - Execute arguments as a shell command.
- exec - Replace the shell with the given command.
- exit - Exit the shell.
- export - Set export attribute for shell variables.
- false - Return an unsuccessful result.
- fc - Display or execute commands from the history list.
- fg - Move job to the foreground.
- for - Execute commands for each member in a list.
- for (( - Arithmetic for loop.
- function - Define shell function.
- getopts - Parse option arguments.
- hash - Remember or display program locations.
- help - Display information about builtin commands.
- history - Display or manipulate the history list.
- if - Execute commands based on conditional.
- jobs - Display status of jobs.
- kill - Send a signal to a job.
- let - Evaluate arithmetic expressions.
- local - Define local variables.
- logout - Exit a login shell.
- mapfile - Read lines from the standard input into an indexed array variable.
- popd - Remove directories from stack.
- printf - Formats and prints ARGUMENTS under control of the FORMAT.
- pushd - Add directories to stack.
- pwd - Print the name of the current working directory.
- read - Read a line from the standard input and split it into fields.
- readarray - Read lines from a file into an array variable.
- readonly - Mark shell variables as unchangeable.
- return - Return from a shell function.
- select - Select words from a list and execute commands.
- set - Set or unset values of shell options and positional parameters.
- shift - Shift positional parameters.
- shopt - Set and unset shell options.
- source - Execute commands from a file in the current shell.
- suspend - Suspend shell execution.
- test - Evaluate conditional expression.
- time - Report time consumed by pipeline's execution.
- times - Display process times.
- trap - Trap signals and other events.
- true - Return a successful result.
- type - Display information about command type.
- typeset - Set variable values and attributes.
- ulimit - Modify shell resource limits.
- umask - Display or set file mode mask.
- unalias - Remove each NAME from the list of defined aliases.
- unset - Unset values and attributes of shell variables and functions.
- until - Execute commands as long as a test does not succeed.
- variables - Common shell variable names and usage.
- wait - Wait for job completion and return exit status.
- while - Execute commands as long as a test succeeds.
- { ... } - Group commands as a unit.
心得感想:對於任何電腦系統,務必熟悉最重要的help指令,不知道怎麼操作就請「help」吧,但前提是你要知道有「help」啊!
相關指令:
- 確認shell的種類:echo $SHELL
- 顯示Bash的版本:echo $BASH_VERSION
###
沒有留言:
張貼留言