How to get diff to NOT follow symlinks?

diff, symlink, symlink-traversal

Solution

There is an argument --no-dereference which is not mentioned in the man page but listed by diff --help.

diff -r --no-dereference  dir1 dir2

Problem

I'm using `diff` to compare two huge volumes, and it is actually comparing many symlinked files over and over. Is there some way to stop this? I want it to just compare the link itself; not follow it. Or is there an alternate app that has this option?

Original source

Related problems