LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   auto updateing symlinks? (https://www.linuxquestions.org/questions/linux-general-1/auto-updateing-symlinks-517099/)

Tortanick 01-07-2007 06:49 AM

auto updateing symlinks?
 
Is it possible to create a symlink that will automatically repoint itself whenever the target file is moved?

raskin 01-07-2007 07:04 AM

Do you want to make a link on the same disk? Use hard links then, it's what they are for. If it is on another disk, it's technically impossible to do correctly, because you can plug your HDD into another computer, mount only one of two partitions and move the file. In that case your link will have no chance to find its target. You are not going to do that, but as what you want cannot (in principle) be done in a entirely correct way, it is not done at all (kernel file system code has stricter requirements for theoretical possibility of correctness).

Tortanick 01-07-2007 07:09 AM

Didn't think about the unmounting point, makes sense not to have this feature.

Thanks for the awnser.


All times are GMT -5. The time now is 02:46 PM.