From owner-freebsd-questions@freebsd.org Mon Nov 2 20:22:38 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 F2FFD45A29F for ; Mon, 2 Nov 2020 20:22:38 +0000 (UTC) (envelope-from doug@fledge.watson.org) Received: from cyrus.watson.org (cyrus.watson.org [204.107.128.30]) by mx1.freebsd.org (Postfix) with ESMTP id 4CQ48s1nm5z3yBc for ; Mon, 2 Nov 2020 20:22:36 +0000 (UTC) (envelope-from doug@fledge.watson.org) Received: from fledge.watson.org (fledge.watson.org [198.74.231.63]) by cyrus.watson.org (Postfix) with ESMTPS id 6F1EE8DF35 for ; Mon, 2 Nov 2020 20:22:36 +0000 (UTC) Received: from fledge.watson.org (doug@localhost [127.0.0.1]) by fledge.watson.org (8.16.1/8.16.1) with ESMTPS id 0A2KMa3a020430 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Mon, 2 Nov 2020 20:22:36 GMT (envelope-from doug@fledge.watson.org) Received: from localhost (doug@localhost) by fledge.watson.org (8.16.1/8.16.1/Submit) with ESMTP id 0A2KMaLu020426 for ; Mon, 2 Nov 2020 20:22:36 GMT (envelope-from doug@fledge.watson.org) Date: Mon, 2 Nov 2020 19:45:42 +0000 (UTC) From: doug Reply-To: doug@safeport.com To: Per olof Ljungmark Subject: Re: simple shell script to compare two dirs recursively In-Reply-To: <34dfc85a-b985-e31f-a6b2-cf14f1f56fd2@nethead.se> Message-ID: References: <34dfc85a-b985-e31f-a6b2-cf14f1f56fd2@nethead.se> User-Agent: Alpine 2.21.9999 (BSF 287 2018-06-16) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed ReSent-Date: Mon, 2 Nov 2020 20:22:20 +0000 (UTC) ReSent-From: doug ReSent-To: freebsd-questions@FreeBSD.org ReSent-Subject: Re: simple shell script to compare two dirs recursively ReSent-Message-ID: ReSent-User-Agent: Alpine 2.21.9999 (BSF 287 2018-06-16) X-Rspamd-Queue-Id: 4CQ48s1nm5z3yBc X-Spamd-Bar: +++++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of doug@fledge.watson.org has no SPF policy when checking 204.107.128.30) smtp.mailfrom=doug@fledge.watson.org X-Spamd-Result: default: False [5.37 / 15.00]; HAS_REPLYTO(0.00)[doug@safeport.com]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.39)[0.386]; MIME_GOOD(-0.10)[text/plain]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; DMARC_NA(0.00)[watson.org]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; RCVD_COUNT_THREE(0.00)[4]; TO_DN_ALL(0.00)[]; NEURAL_SPAM_MEDIUM(1.00)[1.002]; NEURAL_SPAM_LONG(0.99)[0.987]; R_SPF_NA(0.00)[no SPF record]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:11288, ipnet:204.107.128.0/24, country:US]; MID_RHS_MATCH_FROM(0.00)[]; MAILMAN_DEST(0.00)[freebsd-questions]; FORGED_RECIPIENTS(2.00)[peo@nethead.se,freebsd-questions@FreeBSD.org] 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 20:22:39 -0000 On Mon, 2 Nov 2020, Per olof Ljungmark wrote: > Hi all, > > I could *probably* cook this myself with some time and patience, but now it > is somewhat urgent, so if someone likes to share their already working > solution I would be most grateful. > > I need a *simple* shell (does not matter which) script run by cron that > recurses through two directories, compare all the files and produces simple > diffs IF there are any. I'm sure this is something that a lot of you already > did. > > Thanks so much to all the nice folks on the list and FreeBSD in particular! > > Per diff -r --brief -s dir1/ dir2/ then awk is your best friend