Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 783
Dan Avatar asked Nov 01 '22 06:11

Dan


1 Answers

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
like image 199
homac Avatar answered Dec 25 '22 12:12

homac