Type (Unix)
   HOME

TheInfoList



OR:

In
Unix Unix (; trademarked as UNIX) is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, and ...
and Unix-like
operating system An operating system (OS) is system software that manages computer hardware, software resources, and provides common daemon (computing), services for computer programs. Time-sharing operating systems scheduler (computing), schedule tasks for ef ...
s, type is a
command Command may refer to: Computing * Command (computing), a statement in a computer language * COMMAND.COM, the default operating system shell and command-line interpreter for DOS * Command key, a modifier key on Apple Macintosh computer keyboards ...
that describes how its
arguments An argument is a statement or group of statements called premises intended to determine the degree of truth or acceptability of another statement called conclusion. Arguments can be studied from three main perspectives: the logical, the dialectic ...
would be interpreted if used as command names.


Function

Where applicable, type will display the command name's path. Possible command types are: * shell built-in * function * alias * hashed command * keyword The command returns a non-zero exit status if command names cannot be found.


Examples

$ type test test is a shell builtin $ type cp cp is /bin/cp $ type unknown unknown not found $ type type type is a shell builtin


History

The type command was a shell builtin for Bourne shell that was introduced in AT&T's System V Release 2 (SVR2) in 1984, and continues to be included in many other POSIX-compatible shells such as Bash. However, type is not part of the POSIX standard. With a POSIX shell, similar behavior is retrieved with command -V name In the KornShell, the command whence provides similar functionality. The command is available as a separate package for Microsoft Windows as part of the UnxUtils collection of native
Win32 The Windows API, informally WinAPI, is Microsoft's core set of application programming interfaces (APIs) available in the Microsoft Windows operating systems. The name Windows API collectively refers to several different platform implementations t ...
ports A port is a maritime facility comprising one or more wharves or loading areas, where ships load and discharge cargo and passengers. Although usually situated on a sea coast or estuary, ports can also be found far inland, such as H ...
of common GNU Unix-like utilities.Native Win32 ports of some GNU utilities
/ref>


See also

*
List of Unix commands This is a list of Unix commands as specified by IEEE Std 1003.1-2008, which is part of the Single UNIX Specification (SUS). These commands can be found on Unix operating systems and most Unix-like operating systems. List See also * List of ...
*
which (command) In computing, which is a command for various operating systems used to identify the location of executables. The command is available in Unix and Unix-like systems, the AROS shell, for FreeDOS and for Microsoft Windows. The functionality of t ...
*
hash (Unix) hash is a command on Unix and Unix-like operating systems that prints the location information for the commands found. The command has also been ported to the IBM i operating system. Syntax $ hash ame Description When the user gives a comman ...


References

Standard Unix programs Unix SUS2008 utilities IBM i Qshell commands {{operating-system-stub