Author: Stan Eisenstat
Subject: Re: [Cs323] -lstat/ -stat fail while traversing
Date: Monday, 14 Sep 2020, 09:10:35
> Message Posted By: Unknown > > If -lstat or -stat fails while traversing through the directory, what do > you want to be outputted? Do we use perror and then skip to the next file? > How do we create corrupt files to test out this behavior? A warning message, unless the -L flag is specified and the file is a broken symbolic link; for as stated in the man page for find: -L Follow symbolic links. When find examines or prints information about files, the information used shall be taken from the properties of the file to which the link points, not from the link itself (unless it is a broken symbolic link or find is unable to examine the file to which the link points). ... You can use the "ln -s" command to create broken links since it does not check whether the target file exists. --Stan-PREV INDEX NEXT