I have a work laptop that I will soon have to return to my employer. Having foreseen this, I ordered a second internal disk and mounted it at /home/<user>
so that I can just pull it out and mount it in the next machine without having to go through the whole ritual of copying files, etc.
However, I've created a few projects with hard links -- all files are on this secondary mounted disk, so it's like ~/project-one/orig-file.txt
=> ~/project-two/linked-file.txt
I know that such links don't work across file systems, i.e. you can't link from the root and a mounted disk (Google gets me a lot of articles about this), but the question is, will pulling this disk and mounting it in another system break these hard links? Will potentially use the same distro and /home/<user>
directory if that makes a difference. Of course, I will really find out when it comes time to swap out the disk, but it will be good to mentally prepare for what to expect.
..
aren't hard links, you can not have a hard link to a directory. – Oliver Knodel Jun 05 '23 at 16:11