Why was -H and -L choosen for –dereference-command-line and –dereference in ls as well as for example du?
-L choosen for respectively
ls as well as for example
-L were thought to be less commonly used, so could be used in multiple utilities without conflicts. If there is no good historic reason, maybe someone has a good mnemonic device.
The choice of letters is explained in
man symlink (e.g in the OpenBSD version or the Linux version): a tree walk without dereferencing symlinks to directories is called a physical walk (it follows the “physical” directory structure only), a tree walk dereferencing symlinks to directories is called a logical walk (it follows the “logical” structure overlaid by symlinks on top of the physical structure).
-L means “logical”, and
-H “half-logical” (it starts its tree walk logically then switches to a physical walk). You’ll also find
-P for “physical”, e.g.