Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] using find





Thanks guys, I discovered prune last night and got it working. Two
things I didn't mention was the english directory is in fact just ./e/
making life difficult and there is a bogus ./j/ dir as well.

First cut (csh):
find . \! \( -name e -type d -prune \) \! \( -name j -type d 
-prune \) \( -name '*html' -print \)


Second thing I didn't mention was this is for a makefile. Those parens,
either escaped or not were unacceptable. Why is that? I had to
rediscover boolean alegbra to come up with (I have to avoid a bogus ./j/
dir as well):

find . -name e -type d -prune -o -name j -type d -prune -o -name 
'*html' -print


brettr




On Wed, 09 Jun 2004 14:48:55 +0900
Brett Robson <b-robson@example.com> wrote:

> 
> 
> Hi all,
> I have an annoying problem with find. I need to find all files under a
> directory but ignore one subdirectory and under it. This is because the
> English version of our site is in a sub directory of the main directory,
> picking up all the English pages is easy but not Japanese pages.
> 
> 
> ./personal
> ./corp
> ./about
> ./english
> ./english/personal
> ./english/corp
> ./english/about
> 
> I can think of serveral work arounds, passing the results to grep etc
> but is there a simple way of ignoring a sub dir in find? 
> 
> Brett
> 
> 
> 
> 
> 
> 
> -- 
> TLUG June "Nomikai" Social Event  Friday, June 11, 2004 19:00~21:00
> Tengu Shinbashi  http://www.tlug.jp/
> 
> TLUG server is hosted by Open Source Development Lab Japan
> http://www.osdl.jp/
> 
> To unsubscribe from this mailing list, 
> please see the instructions at <http://www.tlug.jp/list.html>
> 

-- 
Brett Robson 
Systems Administrator
GOL, Tokyo. 
http://www.gol.com
Phone: 03-3239-6856    International: +81-3-3239-6856


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links