使用 find
搜索 *.js
文件时如何排除特定目录?
find . -name '*.js'
最佳答案
如果 -prune
对你不起作用,这将:
find -name "*.js" -not -path "./directory/*"
警告:需要遍历所有不需要的目录。
关于linux - 使用 `find` 时如何排除目录?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4210042/