Displays the path name of the working directory.
The pwd command writes to standard output the full path name of your current directory (from the root directory). All directories are separated by a / (slash). The root directory is represented by the first /, and the last directory named is your current directory.
- Displays the value of the PWD environment variable 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). Otherwise, the -L flag behaves the same as the -P flag.
- Displays the absolute path name of the current directory. The absolute path name displayed with the -P flag does not contain file names that, in the context of the path name, refer to files of type symbolic link.
This command returns the following exit values:
|>0||An error occurred.|
displays the current directory as:
|/usr/bin/pwd||Contains the pwd command.|