pwd — Return Working Directory Name

Synopsis

/usr/bin/pwd 

Description

Use the pwd (print working directory) command to display the absolute path name of the current working directory to standard output.

Both the Bourne shell, sh(1), and the Korn shell, ksh(1), also have a built-in pwd command.

Note

If you move the current directory or one above it, pwd may not give the correct response. Use the cd(1) command with a full path name to correct this situation.

Example

The following example displays the current directory, changes to another directory, and displays the new current directory.

castle% pwd 
/export/home/winsor 
castle% cd /etc 
castle% pwd 
/etc 
castle% 

Environment Variables

See environ(5) for descriptions of the following environment ...

Get Solaris™ 7 Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.