Ignore .svn when doing `diff -r`
43,827
Solution 1
Add --exclude=".svn"
as an option like so:
$ diff -r --exclude=".svn" src1/ src2/
Solution 2
diff --exclude=.svn ...
Related videos on Youtube
![Sridhar Ratnakumar](https://i.stack.imgur.com/gVHrv.jpg?s=256&g=1)
Author by
Sridhar Ratnakumar
Updated on September 17, 2022Comments
-
Sridhar Ratnakumar almost 2 years
diff
has an option--recursive
(-r
) to do a comparison between two directories (the files inside them). Is there a way to makediff
ignore certain sub-directories (eg: .svn)?$ diff -r src1/ src2/
-
Nate almost 13 yearsIf you want to exclude multiple items just add another --exclude parameter.
-
alpert about 8 years--exclude option is also not working on mac os. -x ".svn" works well.
-
Michael Tuan Duong over 3 years
--exclude
works well on macOS 10.15.2, /usr/bin/diff 2.8.1