Earlier quoted context omitted.
To change a symlink I use: ln -snf NEW_SOURCE TARGET
Which works fine, but is still not atomic. To be clear, saying something is "atomic" means that there is no way for another process to see the process in an intermediate state (in the example in the article: a missing or incorrect symlink to a deployed web application). Underneath the hood, the /bin/ln program still needs to call unlink() on the path first, so there is a short period of time during which the desired…
I mainly use it when i'm updating apps or SDks to newer versions and want to keep the old ones around just in case.