7. Types of Commands
Contents
Type is a command to view command types. We can look at what types this command can see with the help of the help command:
Alias
Alias is a shortcut to commands, such as ll is a simplified version of ls-alF:
Keyword
Shell has some reserved keywords, while is one of them:
Function
We can use the declare -F command to get the defined functions.
From the results of the command execution above, we know that quote is a function:
We can also use declare’s synonym to get the function, which is typeset:
Builtin
The declare command we use is built into Bash:
File
Some of the commonly used file type commands are mkdir, cp, mv, touch, rm:
We can append the -t parameter behind the type command to get the commands types:
References Type Manual, Alias Command Shell Reserved Words, Shell Functions, Shell Builtin Commands, File Command
If you think the content of this article has helped you, and if you would like some more high-quality materials in the near future, please give me some modest support.
Author Dong Chen
LastMod Fri Feb 8 2019