Hard link vs Soft?link

Hard link vs Soft?link

The inode is a data structure in a Unix-style file system that describes a file-system object such as a file or a directory. Each inode stores the attributes and disk block location of the object’s data. File-system object attributes may include metadata, as well as owner and permission data. Directories are lists of names assigned to inodes. A directory contains an entry for itself, its parent, and each of its children.

Soft link is an actual link to the original file. These links have different inode values.

Hard link is like a copy of the original file. They have the same inode value. Changes made to the original or hard linked file will reflect in the other

In order to make links between files use a command ln, for example:

$ ln dir1 dir2 

that creates a hard link dir2 to the directory dir1

$ ln -s dir3 dir4

create a symbolic link dir4 to the directory dir3

要查看或添加评论,请登录

Yaroslav Makovskiy的更多文章

  • ls utility

    ls utility

    ls is a command to list computer files Unix operating system. Asterisk is a most common wildcard.

社区洞察

其他会员也浏览了