| delorie.com/archives/browse.cgi | search |
| X-Recipient: | archive-cygwin AT delorie DOT com |
| DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
| :list-unsubscribe:list-subscribe:list-archive:list-post | |
| :list-help:sender:date:from:to:subject:message-id:mime-version | |
| :content-type; q=dns; s=default; b=fpsO70fLPekXxluYmJvU60wEUzs84 | |
| 2iVhSv2Arukxl/BvgfP+w7MKBgPa5GhJpdjWr6fzVUXqXnJ01gS4QBnujLvUaS7e | |
| 6N17XmL86Ts50Eel47JsZ41lCaG2mS5kJvC5cUZFlLcb4yk1mav2P+yMFLZET9Jb | |
| OI3GQz2DnMgTdk= | |
| DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
| :list-unsubscribe:list-subscribe:list-archive:list-post | |
| :list-help:sender:date:from:to:subject:message-id:mime-version | |
| :content-type; s=default; bh=k6XKGzSc8b1LKb2qb4bIp/+HkpI=; b=JoV | |
| 8H82qvI0Y5SkZBfdm/hDfBCflTQKTWsKTUWXvBYBF/hRLwhfHTHdUtYQqvuaJFP/ | |
| X1I/eterM76MH4CCdU1z0ao/ogZWZV7qVQW7Gle039AH+Y51/TU9+Ez0zf0PH1MV | |
| J9vRtzWyS4OZ3E5YnEYSPNyZhtsejxLqhUjBvHRA= | |
| 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 |
| 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 |
| Date: | Thu, 30 Jan 2020 19:15:16 +0100 |
| From: | Ulli Horlacher <framstag AT rus DOT uni-stuttgart DOT de> |
| To: | cygwin AT cygwin DOT com |
| Subject: | hardlinks on directories? |
| Message-ID: | <20200130181516.GA29782@tik.uni-stuttgart.de> |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| MIME-Version: | 1.0 |
| User-Agent: | Mutt/1.5.23 (2014-03-12) |
| X-IsSubscribed: | yes |
(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 AT tik DOT uni-stuttgart DOT de
Allmandring 30a Tel: ++49-711-68565868
70569 Stuttgart (Germany) WWW: http://www.tik.uni-stuttgart.de/
REF:<20200130181516 DOT GA29782 AT tik DOT uni-stuttgart DOT 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
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |