type (Unix)

From Wikipedia, the free encyclopedia

type is a Unix command that displays how a name would be interpreted if used as a command.


Contents

[edit] Syntax

type name

[edit] Description

The type command display how a name would be interpreted as a command. Where applicable type will display the name's path. Possible command types are:

[edit] Exit Status

This command returns the following exit values:

  • 0 The standard input was successfully copied to all output files.
  • >0 An error occurred.

[edit] Examples

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