Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • Which versions of find do you want to consider? On Solaris 10, find . -type d prints "." to stdout and "find: cannot read dir ./jen: Permission denied" to stderr. find . -depth -type d prints "find: cannot read dir ./jen: Permission denied" to stderr and "." to stdout. Neither print "./jen" to stdout. Commented Mar 14, 2014 at 16:06
  • @MarkPlotnick The missing . was a copy and paste error. I've updated my question with details about versions and what details I'm hoping I can count on. Commented Mar 14, 2014 at 16:24
  • @MarkPlotnick I find it strange that Solaris 10 does not print ./jen for find . -type d. It's still part of the contents of . even though find can't descend into it. What does ./* glob pattern expand to on Solaris 10? Does it include ./jen? Commented Mar 15, 2014 at 1:54
  • I found it unexpected, too, but that's what it does. echo ./* outputs ./jen. I set up the directory structure to be the same as the OP's. truss shows that find does fchdir() to the open "." fd, then getdents64() = 72, lstat64("jen",...) = 0, openat(..., "jen", ...) => EACCES, then it outputs the error message, then getdents64() = 0, then cleanup and exit. This is on the most recent free Solaris 10/x86 distro from Oracle, Generic_147148-26, in a ufs partition Commented Mar 17, 2014 at 14:40