How to remove all .svn directories from my application directories

前端 未结 11 2605
臣服心动
臣服心动 2020-12-04 04:26

One of the missions of an export tool I have in my application, is to clean all .svn directories from my application directory tree. I am looking for a recursiv

11条回答
  •  清歌不尽
    2020-12-04 05:11

    As an important issue, when you want to utilize shell to delete .svn folders You need -depth argument to prevent find command entering the directory that was just deleted and showing error messages like e.g.

    "find: ./.svn: No such file or directory"
    

    As a result, You can use find command like below:

    cd [dir_to_delete_svn_folders]
    find . -depth -name .svn -exec rm -fr {} \;
    

提交回复
热议问题