bug-findutils
[Top][All Lists]
Advanced

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

[bug #54263] find -L treats ENOENT and ENOTDIR differently


From: Bernhard Voelker
Subject: [bug #54263] find -L treats ENOENT and ENOTDIR differently
Date: Sat, 28 Jul 2018 13:12:00 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0

Follow-up Comment #1, bug #54263 (project findutils):

Reading the specification again:

[http://pubs.opengroup.org/onlinepubs/9699919799/utilities/find.html]


-L   [...].  If the referenced file does not exist, the file information
     and type shall be for the link itself.


This means that an error should not be thrown for broken links (well,
probably
only for primitives that require the symlink to be resolved like '-printf
%Y').

And later on:


Since the -L option resolves all symbolic links and the -type l primary
is true for symbolic links that still exist after symbolic links have
been resolved, the command:

  find -L . -type l

prints a list of symbolic links reachable from the current directory
that do not resolve to accessible files.


The spec does not differentiate between ENOENT and ENOTDIR here.
So the current behavior seems to be debatable, at least.
I have to think about this ...

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?54263>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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