bugfindutils - Bugs: bug #18174, [wishlist] Add "-type u"...


bug #18174: [wishlist] Add "-type u" test for paths with unknown type

Submitter:  Daniel Richard G. <iskunk>
Submitted:  Thu 02 Nov 2006 04:55:49 AM UTC
Category:  find Severity:  3 - Normal
Item Group:  None Status:  Wont Fix
Privacy:  Public Assigned to:  jay
Originator Name:  Open/Closed:  Closed
Release:  None Fixed Release:  None
* Mandatory Fields

Add a New Comment (Rich Markup)

Comment Type & Canned Response:


Sat 05 May 2007 10:33:37 AM UTC, comment #2: 

I've decided not to implement this. 

The current behaviour is easy to explain and complies with POSIX.  The proposed bahviour may or may not be POSIX compliant, is somewhat trickier to explain, and probably makes a lot of things more ambiguous.

For example, this query would print the names of files we can't stat, but the "-size" test would need to fail (since we do not know the size).

find -type u -print -size 3 [more predicates]

However, consider this alternative query:

find -type u -print ! -size 3 [more predicates]

Here, "! -size 3" would also have to fail, because we cannot be sure that the file we cannot stat does not have a size of 3. 

This means that instead of predicates returning true/false valus, they would all need to be able to return Tuue vs. False vs. Indeterminate.

That would add a lot of complexity, and I don't believe the benefit justifies the additional complexity.

James Youngman <jay>
Project Administrator
Sun 05 Nov 2006 01:54:05 AM UTC, comment #1: 

It occurs to me that it's not entirely clear what expressions like

find . -print -type u -ls

should do.   At the moment, this problem doesn't exist because find doesn't process files it cannot stat:-

james@orbital:/tmp$ ls -ld example
drw-r--r-- 3 james users 1024 2006-11-05 01:52 example
james@orbital:/tmp$ ls -l example
total 0
?--------- ? ? ? ?                ? example/leafdir
james@orbital:/tmp$ find example
find: example: Permission denied

James Youngman <jay>
Project Administrator
Thu 02 Nov 2006 04:55:49 AM UTC, original submission:  

For those cases when readdir() returns DT_UNKNOWN and lstat() returns -1/EACCES, allow "-type u" to match.

This would be particularly useful in AFS-served directories for which only "l" ("list") access is available, as any entry therein that is not a subdirectory will present such a situation.

Daniel Richard G. <iskunk>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by jay (Posted a comment)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.





    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-05-05 jay StatusNone Wont Fix
        Assigned toNone jay
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.9