Is it possible to
mv a file w/out breaking a symbolic link to that file?
My initial response to this is no, and I'm working out a script based solution to change the links immediately following the move, but I was wondering how others have approached this issue. The paths and names of the symlinks are known in advance, so In theory all I need to do is:
- get the target of the link
- mv the target
- recreate the link to the new target
- create a new link to the new target (different than the original link, which I still want to keep for now)
At a later date:
- delete the old link
1-4 will be encapsulated in a bash script, but I'm wondering if anyone has a more elegant approach, or knows of a built-in or command that I'm not aware of.