HP-UX Reference (11i v3 07/02) - 1 User Commands N-Z (vol 2)

p
pwd(1) pwd(1)
NAME
pwd - working directory name
SYNOPSIS
pwd [-L|-P]
DESCRIPTION
pwd prints the path name of the working (current) directory.
Options
pwd recognizes the following options:
-L Display the directory with the name of the symbolic link if any.
If the PWD environment variable contains an absolute path name of the current directory that
does not contain the file names
. (dot) or .. (dot-dot), pwd writes this path name to standard
output. Otherwise, the
-L option behaves like the
-P option.
-P Display the actual physical directory path. Directories of symbolic link types are not displayed.
If both -L and -P are specified, the last one applies. If neither
-L nor -P is specified, the default option
is:
-L, from UNIX 2003 environment onwards; see standards(5).
-P,otherwise.
EXTERNAL INFLUENCES
For information about the UNIX Standard environment, see standards(5).
Environment Variables
LC_MESSAGES determines the language in which messages are displayed.
If LC_MESSAGES is not specified in the environment or is set to the empty string, the value of
LANG is
used as a default for each unspecified or empty variable. If
LANG is not specified or is set to the empty
string, a default of "C" (see lang(5)) is used instead of
LANG.
If any internationalization variable contains an invalid setting,
pwd behaves as if all internationalization
variables are set to "C". See environ(5).
International Code Set Support
Single- and multibyte character code sets are supported.
DIAGNOSTICS
Cannot open ..
Read error in ..
Possible file system trouble; contact system administrator.
pwd: cannot access parent directories
Current directory has been removed (usually by a different process). Use cd command to move
to a valid directory (see cd(1)).
EXAMPLES
If your home directory is
/mnt/staff and the command cd camp/nevada is executed from the
home directory, typing pwd produces the following display:
/mnt/staff/camp/nevada
In the following example, a symbolic link, /mnt/vts/symdir, points to the /mnt/vts/realdir
directory. Then the pwd -P command displays the actual directory:
$ cd /mnt/vts/symdir
$ /usr/bin/pwd -P
/mnt/vts/realdir
The pwd -L command displays the directory with the symbolic link:
$ cd /mnt/vts/symdir
HP-UX 11i Version 3: February 2007 1 Hewlett-Packard Company 163