Name
type
Synopsis
type [-afpPt] commandsShow whether each command name is an external command, a built-in command, an alias, a shell keyword, or a defined shell function.
Options
-aPrint all locations in $PATH that include command, including aliases and functions. Use
-ptogether with-ato suppress aliases and functions.-fSuppress function lookup, as with command.
-pIf
type -twould printfilefor a given command, this option prints the full pathname for the executable files. Otherwise, it prints nothing.-PLike
-p, but force a PATH search, even iftype -twould not printfile.-tPrint a word describing each command. The word is one of
alias,builtin,file,function, orkeyword, depending upon the type of each command.
Example
$ type mv read if
mv is /bin/mv
read is a shell builtin
if is a shell keywordBecome an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access