Search code examples
searchack

With ack (or something similar), how do I exclude sub-directories


For example:

-- /
---- foo
------ exclude-me
----  bar
------ exclude-me
---- baz
------ exclude-me

How could I search all foo, bar, and baz, BUT exclude any sub-directory with exclude-me?


Solution

  • For ack, you use case is covered with --ignore-dir=exclude-me (excluding by plain directory name only).

    For something similar, I would try some similar approach after browsing some manual for some time.