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 8.1. Windows Server 2012 R2. Windows 10. Windows Server 2016. Windows Server 2019. Windows 11. Windows Server 2022.

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


AVAILABILITY

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


SEE ALSO

Commands:
set, sh


PTC MKS Toolkit 10.4 Documentation Build 39.