recursive grep skipping/excluding/ignoring all subdirectories -
this going dumbest question yet. i'm sure it's stupidly obvious, life of me, not find solution.
i want search files in current directory pattern, ignoring subdirectories. things i've tried:
grep "mytext" .
-> complains . directory
grep -r "mytext" .
-> searches subdirectories
grep "mytext"
-> freezes (searching entire machine?)
grep -rd skip "mytext" .
-> skips current directory
my last attempt on right track. figured i'd answer question posterity instead of deleting (which tempting since feel stupid having ask in first place).
the solution use skip directories wildcard. i.e.
grep -rd skip "mytext" ./*
Comments
Post a Comment