I'm not sure this is the correct list for your query... but does your diff not have a '--no-dereference' option?
On 17 July 2018 at 19:06, L A Walsh <g...@tlinx.org> wrote: > > Problem I'm running into is comparing two copies of tree that also > contains multiple symlinks. > > First -- I see no way of telling diff not to follow symlinks in > doing comparisons. This seems non-standard for unix/linux utils and in > this case is causing alot of needless comparing like > > trying to compare 'bin' and 'wbin' in my home dir. > under bin, is a lib directory. Additionally some small projects > also have their own directory under bin, but have a symlink > ../lib to get access to library files. > > Already, I'm getting multiple compares on the subtree 'lib' -- many > of which are generating errors as loops like > bin/prog/lib/bin <- may not exist if bin is a symlink pointing to the > parent bin......etc. needless to say, it is a mess. > > Instead of the couple of files I expected to find different, > I'm ending up with a 250K file of diffs -- most of which > are bogus compares. > > So how do I prevent diff from following symlinks - and more usefully, > maybe compare the contents of such symlinks (i.e. most of them > are relative and should be the same between the two trees being compared). > > Am I missing a switch to not follow symlinks? > Seems so basic, its hard to believe it wouldn't already be there....(?) > > Thanks > -l > > > -- Morgan Weetman Services Content Architect M: +61 439 469 793 https://www.redhat.com/en/services/training