2019-02-18 16:56:09 +08:00
|
|
|
# type
|
|
|
|
|
2021-08-15 19:59:09 +02:00
|
|
|
> Display the type of command the shell will execute.
|
2024-04-28 19:28:50 +10:00
|
|
|
> Note: all examples are not POSIX compliant.
|
2021-10-23 23:45:06 +05:00
|
|
|
> More information: <https://manned.org/type>.
|
2019-02-18 16:56:09 +08:00
|
|
|
|
2021-08-15 19:59:09 +02:00
|
|
|
- Display the type of a command:
|
2019-02-18 16:56:09 +08:00
|
|
|
|
|
|
|
`type {{command}}`
|
|
|
|
|
2024-04-28 19:28:50 +10:00
|
|
|
- Display all locations containing the specified executable (works only in Bash/fish/Zsh shells):
|
2019-02-18 16:56:09 +08:00
|
|
|
|
|
|
|
`type -a {{command}}`
|
|
|
|
|
2024-04-28 19:28:50 +10:00
|
|
|
- Display the name of the disk file that would be executed (works only in Bash/fish/Zsh shells):
|
2019-02-18 16:56:09 +08:00
|
|
|
|
|
|
|
`type -p {{command}}`
|
2024-04-28 19:28:50 +10:00
|
|
|
|
|
|
|
- Display the type of a specific command, alias/keyword/function/builtin/file (works only in Bash/fish shells):
|
|
|
|
|
|
|
|
`type -t {{command}}`
|