3 ms·
TIL that MacOS `pwd` has `-P` and `-L` options. -L Display the logical current working directory. -P Display the physical current working d
by rcyeh 13d ago
TIL that MacOS `pwd` has `-P` and `-L` options.
-L Display the logical current working directory.
-P Display the physical current working directory (all symbolic links resolved).
If no options are specified, the -L option is assumed.
In your example, using `-P` will show `Cased`.
- jech 10d ago> TIL that MacOS `pwd` has `-P` and `-L` options. Interestingly, it wasn't designed to deal with case, but to select whether to resolve symbolic links: $ cd /tmp $ mkdir a $ ln -s a b $ cd b $ pwd && pwd -P /tmp/b /tmp/a
- ButlerianJihad 10d agoIn Bash and many modern POSIX shells, `pwd` is a builtin, not to mention an environment variable ${PWD}, but the POSIX system should also provide an external command, such as `/bin/pwd` that would operate on the filesystem, rather than semantically tracking your shell activity. https://manpages.ubuntu.com/manpages/stonking/man1/pwd.1.html https://manpages.ubuntu.com/manpages/stonking/man1/pwd.1.htm...