我想告诉grep,在 Debian 上,不要搜索/proc或 中的文件/sys。但如果我使用:
--exclude-dir=/proc
Run Code Online (Sandbox Code Playgroud)
或者
--exclude-dir={/proc,/sys}
Run Code Online (Sandbox Code Playgroud)
或者
--exclude-dir=/proc --exclude-dir=/sys
Run Code Online (Sandbox Code Playgroud)
然后grep仍然阅读/sys并因此崩溃。那么我怎么能告诉grep跳过/proc和/sys目录呢?
grep ×1