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

前端 未结 9 1478
囚心锁ツ
囚心锁ツ 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:56

    You can also use find with -exec to call diff:

    cd /destination/dir/1
    find . -name *.xml -exec diff {} /destination/dir/2/{} \;
    

提交回复
热议问题