PWD Command-UNIX

PWD Command UNIX

Description

pwd command is used to get the current working directory.

Options

Following options can be used with the pwd command:

-L, –logical use PWD from environment, even if it contains symlinks
-P, –physical avoid all symlinks
–help display this help and exit
–version output version information and exit

Examples

Example 1:

If user wants to check the current directory on which actions are being performed.

$ pwd

/home/epw

Example 2:

If user wants to check the source soft link directory of current working directory:

$ pwd

/home/epw

$ pwd -P

/opt/epw_source