I'm trying to use diff to compare two directory trees while ignoring certain sub-directories, but I cannot get it to work. This is what my file structure looks like:
temp/ |-- d1/ | |-- f1.txt | `-- ignoreme/ | `-- f2.txt `-- d2/ |-- f1.txt `-- ignoreme/ `-- f2.txt I'm trying to get it to ignore anything under d1/ignoreme and d2/ignoreme, but it won't do it.
diff -qr --exclude=/home/ubuntu/temp/d1/ignoreme/ d1 d2 Files d1/ignoreme/f2.txt and d2/ignoreme/f2.txt differ I also tried
diff -qr --exclude=/home/ubuntu/temp/d1/ignoreme/* d1 d2 and
diff -qr --exclude=/home/ubuntu/temp/d1/ignoreme/* --exclude=/home/ubuntu/temp/d2/ignoreme/* d1 d2 ... but I always get the same result.
How do I get this to work?