type
display information about command type on Linux, whether it is a builtin, alias, or file.
Syntax
1
| type [-afptP] name [name ...]
|
Options
Option |
Description |
-a |
display all locations containing name |
-t |
tells if a command or name is an alias, shell reserved word, function, builtin or disk file. |
-p |
path of the file to be execute or nothing if not a file |
-P |
force a path for the command even if it is an alias, builtin or function |
–help |
display help |
Examples
Show Command Info
1 2 3
| type cd type ll type ps
|
Show Command info in one world
1 2 3
| type -t cd type -t ll type -t ps
|
Show all locations of echo
output
1 2
| echo is a shell builtin echo is /bin/echo
|
Show the Path for ps
file
output
Show the Path for echo command
output
Reference