Page 1 of 1

I created my first hard link and have a few questions

Posted: 2019 Sep 22, 20:03
by pschroeter
It’s only taken me over ten years using xplorer² to summon the courage to create my first hard link. I was motivated by the desire leave a file where I originally created it, but to also have in a different folder that gets backed up more often. After extensive Internet research I’m still confused about what might happen in certain situations.

What happens the original data if I delete one of them? I’m getting the impression nothing happens till you delete the last hard link, but it doesn’t warn you when this is about to happen, so you have to keep track of how many you’ve created on your own.

Can I rename or move one of them around? I’m using one of the hard links to back the file up and I wouldn’t mind naming it differently so I know when I delete the last one.

Symbolic links seem to do the same thing, but I couldn’t figure out why they are different, other than I think they can do folders.

Re: I created my first hard link and have a few questions

Posted: 2019 Sep 23, 06:40
by nikos
I have a few blog articles about links

www.zabkat.com/blog/11Feb07.htm
www.zabkat.com/blog/20Feb11-symbolic-links.htm

basically hard links should be the most robust, surviving renames, moving and editing, but in reality many editors destroy them

www.zabkat.com/blog/21Sep08-save-files- ... mments.htm

symbolic links on the other hand will have a problem if you move the "real" file someplace else, just like a windows shortcut