The difference between pwd -L and pwd -P lies in how they handle symbolic links:
-
pwd -L: Prints the current working directory, following symbolic links. It shows the path as it appears in the shell, including any symlinks. -
pwd -P: Prints the current working directory, resolving all symbolic links. It shows the actual physical path, without any symlinks.
Example:
If you are in a directory that is a symlink:
pwd -Lmight output/home/user/symlink_dirpwd -Pmight output/home/user/actual_dir
This distinction is useful for understanding whether you're viewing the symlink path or the real path. Let me know if you need more information!
