| delorie.com/archives/browse.cgi | search |
| X-Recipient: | archive-cygwin AT delorie DOT com |
| X-SWARE-Spam-Status: | No, hits=-2.7 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW |
| X-Spam-Check-By: | sourceware.org |
| Message-ID: | <4F7448A7.5080705@gmail.com> |
| Date: | Thu, 29 Mar 2012 13:33:59 +0200 |
| From: | marco atzeri <marco DOT atzeri AT gmail DOT com> |
| User-Agent: | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20120312 Thunderbird/11.0 |
| MIME-Version: | 1.0 |
| To: | cygwin AT cygwin DOT com |
| Subject: | Re: Compare two directories, architecture only |
| References: | <4F742A9E DOT 3080506 AT bonhard DOT uklinux DOT net> |
| In-Reply-To: | <4F742A9E.3080506@bonhard.uklinux.net> |
| X-IsSubscribed: | yes |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
On 3/29/2012 11:25 AM, Fergus wrote: > Is there an easy way to compare two directories for content (names only > of subdirectories and files, not their identical content). > (1) "diff" compares the content of files: too strong a comparison; > (2) Could "find" both directories and then compare output, but this will > list the entire content under any non-matching subdirectories, when all > I need is the fact of the non-match. > (i.e. I need > diff -rq d1 d2 | sed ' /^Files /d' OR diff -rq d1 d2 | grep '^Only' > without the scrutiny of file content that diff provides.) > Thank you! > Fergus not clear what are you looking for, just if the two trees are equal or also the list of the differences (missing files) ? cd dir1 ; find . -type f > /tmp/list1 cd dir2 ; find . -type f > /tmp/list2 then or cmp /tmp/list1 /tmp/list2 or diff -uN /tmp/list1 /tmp/list2 Regards Marco -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |