Author: Stan Eisenstat
Subject: Re: [Cs323] stats vs lstat for command line files
Date: Wednesday, 09 Sep 2020, 19:38:23
> Message Posted By: Unknown > > If I run /c/cs323/Hwk1/fiend -L file1, I get the same if I run > /c/cs323/Hwk1/fiend file1 which is stat(file1) failed (assuming file1 > doesnt exist in my directory). The output of both is "stat(file1) Failed". > Does this mean for the command line we can use stat for both -L and -P? > Because isn't stat and lstat be giving slightly different information (one > about link, and other about target). No. For example, if foo is a symbolic link to itself, then -L and -P give different answers: % find -L foo find: 'foo': Too many levels of symbolic links % find -P foo foo --Stan-PREV INDEX NEXT