working directory name
utility prints the absolute pathname of the
current working directory to the standard output.
The options are as follows:
- If the
variable is an absolute pathname that references the current directory and
doesn't contain path components of "." or "..", then
PWD is printed as the name of the
current directory. Otherwise, act as if the
-P option was given.
- Print the physical path to the current working directory,
with symbolic links in the path resolved.
override each other and the command's actions are determined by the last one
specified. The default if no options are given is
For an explanation of the directory hierarchy, see
- The presumptive logical path to the current working
utility exits 0 on success,
and >0 if an error occurs.
utility is compliant with the
IEEE Std 1003.1-2008
specification, except the standard says the
default if no options are given should be to behave as if
had been specified.
utility appeared in
Version 5 AT&T UNIX
. Support for the
option was added in OpenBSD
also exists as a built-in to
, which may have a different