From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2743 invoked by alias); 30 Jan 2020 18:16:06 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 2736 invoked by uid 89); 30 Jan 2020 18:16:06 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_05 autolearn=ham version=3.3.1 spammy=senior, EMail, Their, jun X-HELO: mx3.rus.uni-stuttgart.de Received: from mx3.rus.uni-stuttgart.de (HELO mx3.rus.uni-stuttgart.de) (129.69.192.3) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 30 Jan 2020 18:16:03 +0000 Received: from localhost (localhost [127.0.0.1]) by mx3.rus.uni-stuttgart.de (Postfix) with ESMTP id 901952030E for ; Thu, 30 Jan 2020 19:16:00 +0100 (CET) Received: from mx3.rus.uni-stuttgart.de ([127.0.0.1]) by localhost (mx3.rus.uni-stuttgart.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id akxQnTLh9Uez for ; Thu, 30 Jan 2020 19:15:16 +0100 (CET) Received: from diaspora.rus.uni-stuttgart.de (diaspora.rus.uni-stuttgart.de [129.69.13.139]) by mx3.rus.uni-stuttgart.de (Postfix) with ESMTP for ; Thu, 30 Jan 2020 19:15:16 +0100 (CET) Received: from diaspora.rus.uni-stuttgart.de (localhost [127.0.0.1]) by diaspora.rus.uni-stuttgart.de (Postfix) with SMTP id AF95721789 for ; Thu, 30 Jan 2020 19:15:16 +0100 (CET) Date: Thu, 30 Jan 2020 18:16:00 -0000 From: Ulli Horlacher To: cygwin@cygwin.com Subject: hardlinks on directories? Message-ID: <20200130181516.GA29782@tik.uni-stuttgart.de> Mail-Followup-To: cygwin@cygwin.com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2020-01/txt/msg00313.txt.bz2 (I am a UNIX senior admin, but have VERY few knowledge on Windows) UNIX does not support hard links on directories (in opposite to Windows?). I found: /: uname -a CYGWIN_NT-10.0 W10dev 3.1.2(0.340/5/3) 2019-12-21 15:25 x86_64 Cygwin /: ls -ldi /bin /usr/bin 281474976929589 drwxr-xr-x+ 1 admin None 0 Jan 29 16:01 /bin 281474976929589 drwxr-xr-x+ 1 admin None 0 Jan 29 16:01 /usr/bin /: ls -ldi /lib /usr/lib 281474976929595 drwxr-xr-x+ 1 admin None 0 Jun 15 2018 /lib 281474976929595 drwxr-xr-x+ 1 admin None 0 Jun 15 2018 /usr/lib Are this directory hard links? Their content seems to be identical. (How) can I find out with Cygwin which directories are hard links? I could run "find / -xdev -type d -printf "%i %p\n" and look for same inodes. Is there a better methode? /: find / -xdev -type d -printf "%i %p\n" | perl -wne 'push @{$i{$1}},$2 if /^(\d+) (.+)/; END { foreach $n (keys %i) { @f = @{$i{$n}}; print "$n: @f\n" if scalar(@f) > 1} }' | sort -n | head 2: /proc /cygdrive 281474976929589: /bin /usr/bin 281474976929595: /lib /usr/lib 281474976935384: /lib/pkcs11 /usr/lib/pkcs11 281474976935494: /lib/gawk /usr/lib/gawk 281474976938256: /lib/groff /usr/lib/groff 281474976939240: /lib/security /usr/lib/security 281474976939616: /lib/engines-1.1 /usr/lib/engines-1.1 281474976939876: /lib/sasl2_3 /usr/lib/sasl2_3 281474976940081: /lib/p7zip /usr/lib/p7zip Not so good... too much hits: "/lib/pkcs11 /usr/lib/pkcs11" are already in "/lib /usr/lib" -- Ullrich Horlacher Server und Virtualisierung Rechenzentrum TIK Universitaet Stuttgart E-Mail: horlacher@tik.uni-stuttgart.de Allmandring 30a Tel: ++49-711-68565868 70569 Stuttgart (Germany) WWW: http://www.tik.uni-stuttgart.de/ REF:<20200130181516.GA29782@tik.uni-stuttgart.de> -- 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