找到所有文件,例如* .xml文件在外壳中 [英] find all files except e.g. *.xml files in shell
本文介绍了找到所有文件,例如* .xml文件在外壳中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用bash,如何在目录结构中查找* .xml文件以外的文件? 我只是尝试使用
Using bash, how to find files in a directory structure except for *.xml files? I'm just trying to use
find . -regex ....
regexe:
'.*^((?!xml).)*$'
但没有预期的结果...
but without expected results...
还是有另一种方法可以实现这一点,即没有正则表达式匹配?
or is there another way to achieve this, i.e. without a regexp matching?
推荐答案
find . ! -name "*.xml" -type f
这篇关于找到所有文件,例如* .xml文件在外壳中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文