Quick reminder on links in Linux
ln -s sourceFile linkFile (soft link or symbolic link)
ln sourceFile linkFile (hard link)
If we do
ls -lia
we can see the inode numbers which will tell us if the link is hard or soft., if they are the same, it s hard link.
- If we have a soft link and delete the source file, only the source file is deleted and the link remains but points to nowhere.
- If we have a soft link and we delete the linkFile, only the linkFile is deleted.
- If we have a hard link and we delete the source file, only the source file is deleted.
- If we have a hard link and we delete the linkFile, only the linkFile is deleted.
- If we have a link and we modify either file, both are modified.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.