d0g
d0g

Reputation: 1399

How to get diff to NOT follow symlinks?

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?

Upvotes: 7

Views: 1301

Answers (1)

homac
homac

Reputation: 399

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

Upvotes: 5

Related Questions