zoukankan      html  css  js  c++  java
  • Linux find xargs rm .orig

    /*********************************************************************
     *                    Linux find xargs rm .orig
     * 声明:
     *     本文主要是记录在用patch给系统打补丁时,补丁的源文件保存在.orig
     * 文件中,尤其是当打补丁失败时,该文件是会生成的,在操作完成之后,我们
     * 当然会希望自动将.orig文件删除。
     *
     *                                  2016-4-25 深圳 南山平山村 曾剑锋
     ********************************************************************/
    
    
    一、参考文档:
        1. Shell Scripting: Using bash with xargs
            http://stackoverflow.com/questions/1590297/shell-scripting-using-bash-with-xargs
        2. How to delete directories based on `find` output?
            http://unix.stackexchange.com/questions/89925/how-to-delete-directories-based-on-find-output
    
    二、操作方法:
        1. find * -iname *.orig | xargs rm
        2. find . -name ".orig" -exec rm -r "{}" ;
        3. find . -name *.orig -delete
  • 相关阅读:
    DjangoContenttype
    高并发的详解及解决方案
    Django之路由系统
    Django之ORM
    Django form表单
    AJAX
    python之协程
    python八大排序算法
    python之路-进程
    网络基础
  • 原文地址:https://www.cnblogs.com/zengjfgit/p/5429952.html
Copyright © 2011-2022 走看看