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

后端 未结 20 1432
迷失自我
迷失自我 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:51

    wcfind is a find wrapper script that I use to automagically remove .svn directories.

    0 讨论(0)
  • 2020-12-04 05:55

    To resolve this problem, you can simply use this find condition:

    find \( -name 'messages.*' ! -path "*/.svn/*" \) -exec grep -Iw uint {} +
    

    You can add more restriction like this:

    find \( -name 'messages.*' ! -path "*/.svn/*" ! -path "*/CVS/*" \) -exec grep -Iw uint {} +
    

    You can find more information about this in man page section "Operators": http://unixhelp.ed.ac.uk/CGI/man-cgi?find

    0 讨论(0)
提交回复
热议问题