Reputation: 201
diff between 2 directories and I want to exclude few file extension.
I want to exclude few file extension and make a diff
.bak
.bak-extract.txt
.*-extract.txt
.json
I tried
diff dir1 dir2 | sed '.txt.bak'
I am not able to get correct diff
Upvotes: 0
Views: 1007
Reputation: 1054
You can try to exclude those files
diff -r --exclude="bak*.txt" dir1 dir2
Upvotes: 1