remove all of a file type from a directory and its children

后端 未结 6 1716
南笙
南笙 2021-02-01 15:36

I was under impression that

rm -r *.xml

would remove all file from parent and child however:

*.xml: No such file or directory
         


        
6条回答
  •  暖寄归人
    2021-02-01 16:13

    more beautiful way, although this one is less supported in unix systems:

    rm -rf */*.xml
    

    this will remove xml files from all sub-directories of you current directory.

提交回复
热议问题