Hard link (invalid Peripheral cross link)
tuton
Posted messages
94
Status
Membre
-
kmf -
kmf -
Hello, I would like to create a hard link from one folder...
I read on Google that the command "cp -l" or "ln -d" could work but I ended up with an error:
"ln: creating hard link 'rep2' to 'rep1' not possible: invalid cross-device link" ...
I can't find anything about this on the internet, if someone has an idea it would be very kind...
thank you
I read on Google that the command "cp -l" or "ln -d" could work but I ended up with an error:
"ln: creating hard link 'rep2' to 'rep1' not possible: invalid cross-device link" ...
I can't find anything about this on the internet, if someone has an idea it would be very kind...
thank you
3 réponses
Probably you want to create a link on one partition (for example "/") with the original file on another partition (for example "/home") and that, does not work. It is simply impossible by the nature of a hard link (please don’t ask me to explain why, for that you need to learn how ext2/3 and hard links work in detail). The link and the original file must be on the same partition for a hard link. If it’s on different partitions, you need to create a symbolic link (to be created with: "ln -s ...." or "cp -s ...").
In general, a symbolic link always seems preferable to a hard link, especially if you are a beginner. It allows you to do the same things and it is also more easily visible later with "ls -l".
In general, a symbolic link always seems preferable to a hard link, especially if you are a beginner. It allows you to do the same things and it is also more easily visible later with "ls -l".
We discussed it recently
http://www.commentcamarche.net/forum/affich-1378296-Appel-syst%E8me-LINK
--
Gates vous a donné les fenêtres.
GNU nous a donné toute la maison. (Alexandrin)
http://www.commentcamarche.net/forum/affich-1378296-Appel-syst%E8me-LINK
--
Gates vous a donné les fenêtres.
GNU nous a donné toute la maison. (Alexandrin)