pwd:tldr:84491
The pwd
command stands for "print working directory" and is typically used to display the current working directory in a command-line interface.
The -P
option, when used with pwd
, instructs the command to display the physical directory path, rather than the symbolic path. This means that if there are any symbolic links (or shortcuts) in the directory path, it will resolve them and return the actual physical path to the current directory.
For example, if there is a symbolic link called "link" that points to "/home/user/myfolder" and you are currently in that directory, using pwd -P
will display "/home/user/myfolder" instead of "/home/user/link".
In summary, pwd -P
helps you get the physical path of the current working directory, taking into consideration any symbolic links in the directory path.