- NetBSD Manual Pages
PWD(1) NetBSD General Commands Manual PWD(1)
Powered by man-cgi (2021-06-01).
Maintained for NetBSD
by Kimmo Suominen.
Based on man-cgi by Panagiotis Christias.
pwd -- return working directory name
pwd writes the absolute pathname of the current working directory to the
The following options are available:
-L If the PWD environment variable is an absolute pathname that con-
tains neither "/./" nor "/../" and references the current direc-
tory, then PWD is assumed to be the name of the current direc-
-P Print the physical path to the current working directory, with
symbolic links in the path resolved.
The default for the pwd command is -P.
pwd is usually provided as a shell builtin (which may have a different
The pwd utility exits 0 on success, and >0 if an error occurs.
cd(1), csh(1), ksh(1), sh(1), getcwd(3)
The pwd utility is expected to be conforming to IEEE Std 1003.1
(``POSIX.1''), except that the default is -P not -L.
A pwd utility appeared in Version 5 AT&T UNIX.
In csh(1) the command dirs is always faster (although it can give a dif-
ferent answer in the rare case that the current directory or a containing
directory was moved after the shell descended into it).
pwd -L relies on the file system having unique inode numbers. If this is
not true (e.g., on FAT file systems) then pwd -L may fail to detect that
PWD is incorrect.
NetBSD 9.99 August 12, 2016 NetBSD 9.99