How can I get `find` to ignore .svn directories?

后端 未结 20 1514
迷失自我
迷失自我 2020-12-04 05:05

I often use the find command to search through source code, delete files, whatever. Annoyingly, because Subversion stores duplicates of each file in its .

20条回答
  •  生来不讨喜
    2020-12-04 05:48

    i usually pipe the output through grep one more time removing .svn, in my use it isn't much slower. typical example:

    find -name 'messages.*' -exec grep -Iw uint {} + | grep -Ev '.svn|.git|.anythingElseIwannaIgnore'
    

    OR

    find . -type f -print0 | xargs -0 egrep messages. | grep -Ev '.svn|.git|.anythingElseIwannaIgnore'
    

提交回复
热议问题