Linux 如何在跳过 .svn 目录的同时递归搜索 emacs 中的文件

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3677074/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-03 23:12:38  来源:igfitidea点击:

How to recursively search files in emacs while skipping .svn directories

emacs

提问by jondro

I would like to search files (either all of them or matching a pattern) in a directory and it's subdirectories for a certain string. What I usually do in emacs is find-name-dired to list the files and search them, but that also searches all the .svn directories which is wasteful and makes it really slow for large projects. Is there a way to skip .svn directories?

我想在目录及其子目录中搜索某个字符串的文件(所有文件或匹配模式)。我通常在 emacs 中做的是 find-name-dired 列出文件并搜索它们,但这也会搜索所有 .svn 目录,这很浪费并且对于大型项目来说真的很慢。有没有办法跳过 .svn 目录?

Thanks,

谢谢,

采纳答案by zdav

Sounds like you should be using grep in emacs. With grep, you can search for strings in files, and if you use this guy's modgrep will ignore .svn directories.

听起来您应该在 emacs 中使用grep。使用grep,你可以在文件中搜索字符串,如果你使用这个家伙的modgrep 将忽略.svn 目录。

回答by offby1

I think rgrep ignores .svn outta the box.

我认为 rgrep 忽略了 .svn 开箱即用。