1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/type.md

22 lines
626 B
Markdown
Raw Normal View History

2019-02-18 16:56:09 +08:00
# type
> Display the type of command the shell will execute.
2024-04-28 19:28:50 +10:00
> Note: all examples are not POSIX compliant.
> More information: <https://www.gnu.org/software/bash/manual/bash.html#index-type>.
2019-02-18 16:56:09 +08: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}}`