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