Author: Stan Eisenstat
Subject: Re: [Cs323] Symbolic Links
Date: Wednesday, 09 Sep 2020, 15:07:34
> Message Posted By: Unknown > > When finding loops in symbolic links, > > what is the inode number referring to? > > Is that the the inode of the "target file" that the symbolic link is > pointing to, or is it of the "pointer file" that has a symbolic link going > to a target file or something else? Suppose that fiend is traversing the tree rooted at S, where S is a directory that contains a symbolic link T to ../S. Under -P fiend visits S and then S/T, evaluating EXPRESSION at each file. Under -L it first visits S, but when it tries to visit S/T it reaches S again instead. Since the inode number associated with S/T is the same as that associated with S, it sees that there is a loop and issues a warning message rather than evaluating EXPRESSION. ===== > After we find a symbolic link loop, do we need to store the inode number > again? Or should we only store the inodes of files that don't create a > symbolic loop. You need to store the inode numbers for all files on the path from the root of the traversal to the current file. --Stan-PREV INDEX NEXT