Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am searching for some directories in find command and if that directory is present then I need to take some action on it. But what is happening is: At some places though the main directories (for which I am searching) hidden .svn directories are present and they are populating as a result of find.

I dont want this .svn dir to be a part of find result.

Here is the find command which i am using :

find <search dir> -mindepth 3 -maxdepth 3 -type d  -regex ".*/V[0-9]+/.*+/.*+")
share|improve this question
Why did you not use svn export in the first place? – Ignacio Vazquez-Abrams Apr 26 '11 at 10:39
find some/dir \( -name .svn -prune \) -o \( ... \)
share|improve this answer
hey i am new to unix so not aware of many otions : do u mean something lke this : find <dirname> -mindepth 3 -maxdepth 3 -type d ( -name .svn -prune ) -o (.*/V[0-9]+/.*+ ) – Ankit Apr 26 '11 at 11:07

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.