A diagram to explain the difference between a hard link and soft link Linux file system

As shown, the original hard links share a file inode, but is not cross inode file systems (Ext3, Ext4), each file system has its own inode list. Therefore, there is no way hard links across file systems
and different soft links, soft links to re-create the equivalent of a file. The file also has a separate inode, but broke out this document to see the contents inside when the contents of a file that points to another.
Across file systems, and even the target file is deleted, the linked files or in, but can not find the file pointed to it (shortcut in Window)

The characteristics of hard links

  • Can not cross-file system
  • You can not link directory
  • Safety

Guess you like

Origin www.cnblogs.com/yeni/p/11570549.html