Consider the following dir/file structure (all leaf nodes are regular files, not that it really matters):
$ tree . ├── cool_1 │ ├── dumb │ │ ├── file1 │ │ └── file2 │ └── foo │ └── dumb └── cool_2 ├── dumb │ ├── file1 │ └── file2 └── foo └── dumb I want to do a recursive diff of the two directories, excluding the regular files <root>/foo/dumb but not the entire directories <root>/dumb.
I've looked at --exclude and --exclude-from in man 1 diff and if there's a way to make a pattern that would do this, I'm at a loss, other than writing a script that does the recursion by hand or something like that. How can I compare directories and exclude what I want and only what I want?