Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Nov 2020 20:07:37 +0100
From:      Ralf Mardorf <ralf-mardorf@riseup.net>
To:        freebsd-questions@freebsd.org
Subject:   Re: simple shell script to compare two dirs recursively
Message-ID:  <20201102200737.27745317@archlinux>
In-Reply-To: <6d734580-55b0-eb70-677c-4270f29a00a9@kicp.uchicago.edu>
References:  <34dfc85a-b985-e31f-a6b2-cf14f1f56fd2@nethead.se> <6d734580-55b0-eb70-677c-4270f29a00a9@kicp.uchicago.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 2 Nov 2020 12:14:11 -0600, Valeri Galtsev wrote:
>diff -r /path1 /path2

Yesno :D. FWIW

diff -r /path1 /path2; echo $?

sometimes could be a PITA, at least on Linux.

I prefer

diff -r --no-dereference /path1 /path2; echo $?

;).

However, I'm used to (bash on) Linux, OTOH

https://www.freebsd.org/cgi/man.cgi?diff

Ctrl+F no-dereference

doesn't find a match. I don't know how soft links are handled by
FreeBSD's diff, but the diff I'm used to tends to fail, without the
--no-dereference option, if soft links are involved. If so, it quasi
suffers from false positives.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20201102200737.27745317>