I have directory structure like this
data
|___
|
abc
|____incoming
def
|____incoming
|____processed
123
|___incoming
456
|___i
This is what I did to exclude all the .git
directories and passed it to -exec
for greping something in the
find . -not -path '*/\.*' -type f -exec grep "pattern" [] \;
-not -path '*/\.*'
will exclude all the hidden directories-type f
will only list type file and then you can pass that to -exec
or whatever you want todo