Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Sometimes you download stuff that relies on case sensitivity. Anyone who's dealt with this probably has a sensitive RW DMG lying around for this reason. But macOS FSes default to case-insensitive, so random issues come up if you make your root sensitive (famously in Adobe software). Damned if you do or don't.

Another weird thing in macOS:

  $ mkdir Cased
  $ cd cased
  $ pwd
  /Users/me/Downloads/cased
  $ cd ../Cased && pwd
  /Users/me/Downloads/Cased
So yeah I wish the FS defaulted to sensitive, even though I never rely on that. Not its job to normalize names.


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`.


In 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.htm...


> 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




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: