I would like to diff two versions of a file that reside in different directories, for example:
diff ./dirA/foo.txt ./dirB/foo.txt
I vaguely remember there is a way to write this in a more condensed way, so that the filename appears only once. Something like:
diff {./dirA/, ./dirB/}foo.txt
Anyone know how to do this?
Close. No space.
or, in the more likely case that the two folders don’t actually have a common substring like that,
And, should you want to compare the whole tree, note that
diffhas a recursive (-r) option.