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

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

    As follows:

    find . -path '*/.svn*' -prune -o -print
    

    Or, alternatively based on a directory and not a path prefix:

    find . -name .svn -a -type d -prune -o -print
    

提交回复
热议问题