Forrest logo
back to the pwd tool

pwd:tldr:f98e4

pwd: Print the current logical directory.
$ pwd --logical
try on your machine

The command "pwd --logical" is used to display the current working directory, considering any symbolic links that exist in the path.

By default, the "pwd" command displays the current working directory without following any symbolic links. However, when "--logical" option is added, it resolves any symbolic links in the path and displays the result accordingly.

For example, suppose you have a symbolic link named "link" that points to "/path/to/directory". If you are currently in the directory "/path/to/directory", running "pwd" alone will display "/path/to/directory" as the current working directory. However, if you run "pwd --logical", it will display the path of the symbolic link itself, which is "/path/to/link".

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the pwd tool