Sample Header Ad - 728x90

Invalid cross-device link while Hardlinking in the same file system

23 votes
5 answers
141946 views
I have **/home/myuser/Desktop/rc/.netrc** file that i want hardlink to **/root**, ie home directory of **root** user. When i do: ln /home/user/Destkop/rc/.netrc /root it gives the following error: > ln: creating hard link /root/.netrc' => .netrc': Invalid > cross-device link but it works when i hardlink the file to **myuser**'s home, ie to **/home/myuser**. So, what's the problem, why it says invalid cross-devices when there is only one file system here? **PS.** I am using **RHEL6**
Asked by Elvin Aslanov (387 rep)
Jun 12, 2013, 09:48 AM
Last activity: Jul 19, 2025, 11:33 AM