Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • realpath resolves symlinks
    – balupton
    Commented Sep 26, 2021 at 18:21
  • @balupton in newer versions of realpath, one can use realpath --no-symlinks <file> if they want the full path to a file without resolving symlinks (as you pointed out, they are resolved by default). I'm on Fedora 35 right now and confirm GNU realpath v8.32 supports this. Might be in older versions too; I did not test on any Debian-based distros / research when the option was added. Also did not test BSD versions so no clue for Mac / OpenBSD / etc. So in terms of Mac/homebrew, you would need the gnu coretools for this.
    – zpangwin
    Commented Nov 14, 2022 at 21:48