If I have a symbolic link /var/opt/foo created with ln -fs /path/to/target/dir foo. How can I in a script that sees only the link get /path/to/target/dir?
What I want to achieve in the script is rm -rf /path/to/target/dir before I do ln -fs /path/to/another/dir foo.