在子目录中的多个文件中查找替换文本。排除一些子目录

时间:2015-11-20 16:55:27

标签: unix replace sed find

我想在我的子目录的某些文件中找到将patter1替换为pattern2。但是将一些子目录排除在外。这个命令有什么问题?

 public class ViewModel: DependencyObject
 {

            public static readonly DependencyProperty TypeProperty = DependencyProperty.Register(
                "Type", typeof (string), typeof (ViewModel), new PropertyMetadata(default(string)));

            public int Type
            {
                get { return (int) GetValue(TypeProperty ); }
                set { SetValue(TypeProperty , value); }
            }
 }

1 个答案:

答案 0 :(得分:1)

我在--exclude-dir中没有看到man find选项(我在man grep中看到了,但您不能只借用其他命令的选项。)

尝试

find . -type f -not -path './workspace*' ...
相关问题