How to get diff to NOT follow symlinks?

1.1k views Asked by At

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?

1

There are 1 answers

1
homac On

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