Grammar:
Type [-TPA] Name
Parameters:
Type: When no arguments are added, the type shows whether the name is an external command or internal bash built-in command
-T: When the-t parameter is added, the type will show the meaning of name with the following words
File: Represented as an external command
Alias: Indicates the name that the command is set for the command alias
Builtin: Indicates that the command functions as a bash built-in command
-P: The full file name is displayed if the next name is an external command
-A: A path defined by the path variable that lists all commands that contain name, including the alias
Example: Query ls whether this command is bash built-in
[[Email protected] ~]# type ls
LS is aliased to ' LS--color=auto '
[[email protected] ~]# type-t ls
Alias
[[email protected] ~]# type-a ls
LS is aliased to ' LS--color=auto '
LS Is/bin/ls
Example two: Query CD
[[Email protected] ~]# type cd
CD is a shell builtin
[[email protected] ~]# type-t CD
Builtin
[[email protected] ~]# type-a CD
CD is a shell builtin
This article is from the "perfect start" blog, be sure to keep this source http://7184803.blog.51cto.com/7174803/1413377