pwd

display working directory 

Command, KornShell Built-in


SYNOPSIS

pwd [-L|-P] [-d drive]


DESCRIPTION

pwd displays the absolute path name of the current working directory to standard output.

Options

-d drive 

displays the current the current working directory on the specified drive. Only the first letter of drive is looked at and is interpreted as being a drive letter.

Note:

drive may also be specified in NuTCRACKER Platform format (for example, /c=/). In such a case, the path is fist translated to the standard format before the first letter is taken and interpreted as the drive letter.

-L 

includes symbolic links, if appropriate, in the path name displayed.

For the standalone external version of pwd, this is the default behavior and the -L option is not required. However, because the default behavior of the built-in version can change from using logical links to using physical link (and back) by using set ±o physical or set ±P, the -L is required if you want to ensure that symbolic links are included in the displayed path name.

-P 

forces the physical directory structure to be followed. No symbolic links are included in the path name displayed. This same behavior can be obtained by using -P or -o physical with set.


DIAGNOSTICS

Possible exit status values are:

0 

Successful completion.

1 

pwd cannot determine the current working directory.


NOTE

pwd is provided as both an external utility and a built-in MKS KornShell utility.


PORTABILITY

POSIX.2. x/OPEN Portability Guide 4.0. All UNIX systems. Windows 2000. Windows XP. Windows Server 2003. Windows Vista. Windows 7. Windows Server 2008. Windows 8. Windows Server 2012.

The cd command on Windows systems has a similar function. On Windows systems, the output of pwd includes the current drive specification.


AVAILABILITY

MKS Toolkit for Power Users
MKS Toolkit for System Administrators
MKS Toolkit for Developers
MKS Toolkit for Interoperability
MKS Toolkit for Professional Developers
MKS Toolkit for Enterprise Developers
MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Commands:
set, sh


MKS Toolkit 9.5 Documentation Build 3.