The -path/-prune combination of the "find" command does not work as documented. Reproducible: Always Steps to Reproduce: 1. find /dev -path /dev/snd -prune -type d -print Actual Results: Prints: /dev/snd Expected Results: Should print all of the directories under /dev *except* /dev/snd. This findutils has been installed since October of 2008 and I noticed the problem months ago but kept assuming it was my problem. I think it may have once worked but I'm not sure how long ago. I can't believe that others have not run into this since its a fairly standard usage for producing a list of files that one wants to backup, transfer, etc. Now maybe I'm misreading the man page (and a lot of other pages on the web that include find documentation, tutorials, examples, etc.). If so please tell me how to do a find and not go into a directory or any of its subdirectories.
find /dev -path /dev/snd -prune -or -type d -print You're combining -path /dev/snd with -print; you won't ever print anything other than /dev/snd that way. (And this belongs on the forums, really.)
Ok, I see it now. Its a clause that because it is satisfied short circuits the rest of the expression. Believe me, I read and reread the man page, did the web searches, looked at various examples, etc. and it just wasn't making sense. Sorry for the trouble but I honestly thought it was a bug -- and I do report bugs upstream when I know the locations for reporting them, but to the best of my knowledge core system utilities come down from GNU and I'm not aware that they have a bugzilla system.
(In reply to comment #2) > Sorry for the trouble but I honestly thought it was a bug -- and I do report > bugs upstream when I know the locations for reporting them, but to the best of > my knowledge core system utilities come down from GNU and I'm not aware that > they have a bugzilla system. If you're sure you've found a bug: http://savannah.gnu.org/bugs/?group=findutils If you're not sure, and would like to ask: http://lists.gnu.org/mailman/listinfo/bug-findutils/ That's for upstream, but I'll restate that questions such as this one are also welcome on the Gentoo forums. And no trouble.