bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ls -L should say just what file doesn't exist


From: Brian Dessent
Subject: Re: ls -L should say just what file doesn't exist
Date: Wed, 23 Nov 2005 13:19:08 -0800

Dan Jacobson wrote:

> lrwxrwxrwx  1 2 2005-11-18 07:08 xx -> yy
> grep: xx: No such file or directory
> 
> User thinks: the problem is really

Grep isn't part of coreutils, so this is off-topic for this list.  You
may want to make your case on the grep mailing list:
<http://www.gnu.org/software/grep/devel.html>.

But as I see it the whole point of symlinks is that the program that is
accessing the link sees it just like a normal file (unless it
specifically checks) and the operating system takes care of resolving
the link.  So from grep's point of view 'xx' really doesn't exist, and
it shouldn't have to know or care about the details of how symlinks
works.  In a way the error is correctly telling you that there is a
problem with 'xx', namely that the link points to something that doesn't
exist.

Also, someone suggested something similar in another thread and one of
the responses made the point that in order to implement this, the
program would have to potentially traverse a number of links (e.g. xx ->
yy -> zz) and in doing so it would need to be careful not to get stuck
in a loop (xx -> yy -> xx) and other such issues.  So implementing this
may not be trivial.

Brian




reply via email to

[Prev in Thread] Current Thread [Next in Thread]