Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 303671 - sys-apps/findutils fails to work as documented
Summary: sys-apps/findutils fails to work as documented
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Gentoo Linux bug wranglers
URL: N/A
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-06 05:29 UTC by Robert Bradbury
Modified: 2010-02-07 21:54 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Bradbury 2010-02-06 05:29:12 UTC
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.
Comment 1 Harald van Dijk (RETIRED) gentoo-dev 2010-02-06 14:11:12 UTC
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.)
Comment 2 Robert Bradbury 2010-02-07 01:50:19 UTC
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.
Comment 3 Harald van Dijk (RETIRED) gentoo-dev 2010-02-07 21:54:10 UTC
(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.