PWD(1)
NAME
pwd, pbd − working directory
SYNOPSIS
pwd
pbd
DESCRIPTION
Pwd prints the path name of the working (current) directory. Pwd is guaranteed to return the same path that was used to enter the directory. If, however, the name space has changed, or directory names have been changed, this path name may no longer be valid. (See fd2path(2) for a description of pwd’s mechanism.)
Pbd prints the base name of the working (current) directory. It prints no final newline and is intended for applications such as constructing shell prompts. Since it uses stat(2) to discover the name of . (dot), if the directory has been bound to another name, it will show the underlying name rather than that reported by pwd.
SOURCE
/sys/src/cmd/pwd.c
/sys/src/cmd/pbd.c
SEE ALSO
cd in rc(1), bind(1), intro(2), getwd(2), fd2path(2)
Plan 9 — March 27, 2001