When I wanted to create a hard link in my
/home directory in root mode, Linux showed the following error message:
ln: failed to create hard link ‘my_sdb’ => ‘/dev/sda1’: Invalid cross-device link
The above error message is shown below:
# cd /home/user/ # ln /dev/sda1 my_sdb
But I could only create a hard link in the
/dev directory, and it was not possible in other directories.
Now, I want to know how to create a hard link from an existing device file (like
/home directory (or other directories) ?