I am curious that hard link cannot cross the boundary of file system. But where exactly is the boundary? I know hard disk and flash disk are two file systems; /home and /var are two file systems. But how about /home/a and /home/b? I am quite confused.
migrated from stackoverflow.com Apr 23 at 13:14
This question came from our site for professional and enthusiast programmers.
In this case, the boundary is the "device". If you do
Note that the "filesystem" isn't
When you look at this device node, you get something like this:
A hard link just contains the name of the entry and the number of an inode. Since there is no place to store the unique device ID, the hard link cannot point to a different device There are technical reasons for this as well, like with USB disks, the same "unique device ID" is only unique until you restart. So even if you could create hard links between file systems, there would be no way to be sure they were still valid after a reboot (among other reasons).
Note that the partition on your hard disk is the "file system", not the place where it is "mounted". That is, you can mount