How do you diff a directory for only files of a specific type?

前端 未结 9 1487
囚心锁ツ
囚心锁ツ 2021-01-31 13:15

I have a question about the diff command if I want a recursive directory diff but only for a specific file type, how to do that?

I tried using the exclude option but can

9条回答
  •  春和景丽
    2021-01-31 13:35

    I used the following command to find the diff of all *.tmpl files between DIR1 and DIR2. In my case this didn't yield any false positives, but it may for you, depending on the contents of your DIRS.

    diff --brief DIR1 DIR2 | grep tmpl

提交回复
热议问题