diff showing too many 'diff'erences...
![diff showing too many 'diff'erences...](https://res.cloudinary.com/audiodog/image/upload/w_640,h_155,c_scale,f_auto,q_auto/v1513806711/images/site/blog_banner_light.png)
I like diff. If I'm developing the same codebase in more than one place and not using subversion or similar it's essential to have a command that can spot any differences quickly and easily.
Recently I was doing just this but getting way too many file differences, and most were xml files. I hadn't altered any xml files!
Turns out it was something to do with whitespace. Maybe the file encoding or linefeeds altered during ftp or something. Either way the -w option sorted it. Delving into the man pages revealed a few useful options:
-w : Ignore whitespace
-a : treat all as text
-d : look for minimal differences
-r : recursive
-q : quiet, only output if files differ
-x filename : exclude filenames (useful to ignore .DSStore, .svn, etc)