Prune problems with find.

From: Ian Stirling (root_at_mauve.demon.co.uk)
Date: 12/13/04


Date: 12 Dec 2004 23:49:10 GMT

I presume I'm doing something stupid, but I can't see it.

A test case.

$ find .
.
./1
./1/ls
./2
./2/ls
./3
./3/ls
./2o
./2o/ls

$ find . -type d -path ./2o
./2o

(as expected)

find . -type d -path ./2o -prune -o -print
.
./1
./1/ls
./2
./2/ls
./3
./3/ls

Huh?

Ok, it sort-of works, excluding path ./2o, but why do I get every
file listed.
And is listed highest in the precedence order, and surely if the LHS
(-type d) fails, the rest is not executed?

Any help gratefully accepted.



Relevant Pages

  • Re: Causes of death, U.S nationally vs. Tennessee
    ... > presume the worst about anyone who disagrees with you. ... And I don't presume this about many people other than yourself. ... The speed of the kick is marginally faster at best; ... Most of what you say on this newsgroup is stupid. ...
    (rec.martial-arts)
  • Re: Turning spell check, grammar correction, etc
    ... I feel stupid now because I was looking straight at it. ... high achievement, and who at the worst, if he fails, at least fails ... DON'T click the Spelling & Grammar ...
    (microsoft.public.word.docmanagement)
  • Re: Driver who made the fewest mistakes in 2010...
    ... You presume incompetence ... "Krauts are cheats" then I think it's fair to presume racism (putting ... it is becoming confused with stupid comments made by stupid ...
    (rec.autos.sport.f1)
  • Re: Once Again: Relativity for Thought Experiments
    ... You're like a kid who fails a math test and then declares: ... rest of your life to calling the subject stupid. ... about you, but not about relativity. ...
    (sci.physics.relativity)
  • Re: RpcNsBindingLookupBegin() returns 1761:The entry is not found
    ... I presume there is a DECLARATION of the variable "EntryName", ... Now it fails almost every time. ... Perhaps the entry you are asking for does not exist in newer operating systems? ...
    (microsoft.public.vc.mfc)