[英]list all xml files within a directory and subdirectory
I want to list all .xml files in a dir and its subdir. 我想在dir及其子目录中列出所有.xml文件。 I tried ls -LR but not able to filter out other files apart from .xml.. 我试过ls -LR但是不能过滤除.xml以外的其他文件..
I want something like ls -LR | 我想要像ls -LR |这样的东西 grep *.xml . grep * .xml。
Thanks! 谢谢!
您可以使用find
命令:
find . -type f -name '*.xml'
Since you tagged the question with bash: 由于您使用bash标记了问题:
shopt -s extglob globstar
ls !(exclude.this.dir)/**/*.xml
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.