# find、grep 排除指定目录

通过findgrep查找文件、内容的时候排查指定目录(如node_modules

# grep

grep -i --exclude-dir=node_modules -r "content" *

通过grep查找内容速度过慢时,推荐使用,参考文档 rgrep (opens new window)

# find

find . -name "package.json" ! -path "*node_modules*"
最后更新: Sat, 15 Mar 2025 10:45:35 GMT

0 评论

加载中...
访问量:-
源码 | 反馈
注意:聊天日志不会保存,请注意备份.
提示:点击头像可进入私聊
发送