From owner-freebsd-questions@freebsd.org Mon Nov 2 21:51:25 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D1A3045C0F9 for ; Mon, 2 Nov 2020 21:51:25 +0000 (UTC) (envelope-from ralf-mardorf@riseup.net) Received: from mx1.riseup.net (mx1.riseup.net [198.252.153.129]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CQ67K22ktz442r for ; Mon, 2 Nov 2020 21:51:24 +0000 (UTC) (envelope-from ralf-mardorf@riseup.net) Received: from capuchin.riseup.net (capuchin-pn.riseup.net [10.0.1.176]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4CQ67C31M8zFtMt for ; Mon, 2 Nov 2020 13:51:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1604353879; bh=32vnKQ5YTfQrTbLfSxLXcB3CFXL/g1Pr5kZIE8dJwZU=; h=Date:From:To:Subject:In-Reply-To:References:From; b=MSNsfA0Dbhl42sdO0rcwssAFNvGqMvSQX6xi6IVASSQOc5FZe11piPtzOM3cupMz3 +MZP8dd9dWsC27YRXQM1gVcYrgY1eYkOvHoPoMwNq6PbLmtK1B79FcCGe57SwHFXwz 2IO0xpH1hKLIvqwR3vrezlorlN3qTCWiUo63m1wc= X-Riseup-User-ID: E5DCBF7F25385AD059238A704522532F83BC0594B085284A27EE7FAD312AD3F5 Received: from [127.0.0.1] (localhost [127.0.0.1]) by capuchin.riseup.net (Postfix) with ESMTPSA id 4CQ67B5b53z8tTS for ; Mon, 2 Nov 2020 13:51:18 -0800 (PST) Date: Mon, 2 Nov 2020 22:51:11 +0100 From: Ralf Mardorf To: freebsd-questions@freebsd.org Subject: Re: simple shell script to compare two dirs recursively Message-ID: <20201102225111.48fe1c76@archlinux> In-Reply-To: <20201102211638.c756c71b721105cdeb3bd048@sohara.org> References: <34dfc85a-b985-e31f-a6b2-cf14f1f56fd2@nethead.se> <6d734580-55b0-eb70-677c-4270f29a00a9@kicp.uchicago.edu> <20201102200737.27745317@archlinux> <20201102211638.c756c71b721105cdeb3bd048@sohara.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4CQ67K22ktz442r X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=riseup.net header.s=squak header.b=MSNsfA0D; dmarc=pass (policy=none) header.from=riseup.net; spf=pass (mx1.freebsd.org: domain of ralf-mardorf@riseup.net designates 198.252.153.129 as permitted sender) smtp.mailfrom=ralf-mardorf@riseup.net X-Spamd-Result: default: False [-4.23 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[riseup.net:s=squak]; NEURAL_HAM_MEDIUM(-1.07)[-1.073]; FROM_HAS_DN(0.00)[]; RWL_MAILSPIKE_GOOD(0.00)[198.252.153.129:from]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; DWL_DNSWL_LOW(-1.00)[riseup.net:dkim]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[riseup.net:+]; DMARC_POLICY_ALLOW(-0.50)[riseup.net,none]; NEURAL_HAM_SHORT(-0.56)[-0.558]; NEURAL_HAM_LONG(-1.00)[-0.996]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; MID_RHS_NOT_FQDN(0.50)[]; ASN(0.00)[asn:16652, ipnet:198.252.153.0/24, country:US]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-questions]; RCVD_IN_DNSWL_LOW(-0.10)[198.252.153.129:from] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2020 21:51:25 -0000 On Mon, 2 Nov 2020 21:16:38 +0000, Steve O'Hara-Smith wrote: >I'm not sure what behaviour you expect but with FreeBSD diff if you >have a directory full of files and a directory full of symlinks to the >same files (with the same names) then diff will find them to be >identical, it simply reads contents and does not notice the symlink. It does matter to either diff the soft link file itself or to diff following the soft link. It could depend on the origin. You might have used a copy command with whatever option and later you diff with or without all original mount points available, or ... There are a few pitfalls related to dangling and not dangling links. However, you easily end up with a diff of a real directory and a soft link file without a valid path to the same directory.