如果您试图创建跨越文件系统或用于目录的硬链接,您会得到一个错误。
You will get an error if you attempt to create hard links that cross file systems or that are for directories.
文件系统上每一个目录都有一个点的名称(一个硬链接)。
Every directory on the filesystem has a name (a hard link) of dot.
一个硬链接是指向inode的一个目录条目,而一个软链接或符号链接是指向提供另一目录条目名称的inode的一个目录条目。
A hard link is a directory entry that points to an inode, while a soft link or symbolic link is a directory entry that points to an inode that provides the name of another directory entry.
和..)的特殊目录条目,它们是保持大量子目录计数的硬链接。
The exception is the special directory entries in a directory for the directory itself and for its parent (. and ..), which are hard links that maintain the count of the number of subdirectories.
条目和每个子目录条目使用另外的硬链接。
清单1展示了如何创建一个包含两个文件和一个子目录的目录,其中有两个到file1的硬链接,其中一个在同一目录中,而另一个在子目录中。
Listing 1 shows how to create a directory containing two files and a subdirectory with two hard links to file1, one in the same directory and one in the subdirectory.
文件的目录条目包含到文件的inode 的硬链接(或指针),因此列出的每个条目都应该至少拥有一个硬链接。
The file's directory entry contains a hard link (or pointer) to the inode for the file, so every entry listed should have at least one hard link.
这个列表显示当前目录下的4个目录项(硬链接):.、..、bin和foo。
The listings show the directory’s four entries (hard links): ., .., bin and foo.
这个列表显示当前目录下的4个目录项(硬链接):.、..、bin和foo。
The listings show the directory’s four entries (hard links): ., .., bin and foo.
应用推荐