They are the same in terms of their inode number of course. There are infinitely many further paths of the file. They multiply filesįiles are identified by paths, after resolving symlinks. In the second case, /tmp/a/b/l is the parent directory of /tmp/a/b/l/b, which is the same as /tmp/a/b. In the first case, /tmp/a is the parent directory of /tmp/a/b. With a filesystem loop, multiple parent directories exist: cd /tmp/a/b ![]() They break the unambiguity of parent directories For example, these commands could create a loop with the back link l: mkdir -p /tmp/a/bĪ filesystem with a directory loop has infinite depth: cd /tmp/a/b/l/b/l/b/l/b/l/bĪvoiding an infinite loop when traversing such a directory structure is somewhat difficult (though for example POSIX requires find to avoid this).Ī file system with this kind of hard link is no longer a tree, because a tree must not, by definition, contain a loop. ![]() Directory hardlinks break the filesystem in multiple ways They allow you to create loopsĪ hard link to a directory can link to a parent of itself, which creates a file system loop.
0 Comments
Leave a Reply. |