diff has an option --recursive (-r) to do a comparison between two directories (the files inside them). Is there a way to make diff ignore certain sub-directories (eg: .svn)?
$ diff -r src1/ src2/
diff has an option --recursive (-r) to do a comparison between two directories (the files inside them). Is there a way to make diff ignore certain sub-directories (eg: .svn)?
$ diff -r src1/ src2/
Add --exclude=".svn" as an option like so:
$ diff -r --exclude=".svn" src1/ src2/
--excludeevery time use-x ".svn"– acorello Aug 14 '12 at 09:03--excludeworks well on macOS 10.15.2, /usr/bin/diff 2.8.1 – Pavel Vlasov Mar 09 '21 at 13:00