PWD Command-UNIX

PWD Command UNIX


pwd command is used to get the current working directory.


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


Example 1:

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

$ pwd


Example 2:

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

$ pwd


$ pwd -P