This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: hardlinks on directories?


On 2020-01-31 03:17, Ulli Horlacher wrote:
> On Thu 2020-01-30 (12:26), Eric Blake wrote:
> 
>>> Are this directory hard links?
>>
>> No, rather they are parallel mount points (the same directory mounted 
>> under two different names).
> 
> /: mount
> C:/cygwin64/bin on /usr/bin type ntfs (binary,auto)
> C:/cygwin64/lib on /usr/lib type ntfs (binary,auto)
> C:/cygwin64 on / type ntfs (binary,auto)
> C: on /cygdrive/c type ntfs (binary,posix=0,user,noumount,auto)
> 
> That's it! Thanks!
> 
> But why does Cygwin mount the directories /usr/bin and /usr/lib extra?

$ cmd /c dir `cygpath -aw /usr`
...
2020-01-30  17:51    <DIR>          include
2020-01-19  13:55    <DIR>          libexec
2019-09-29  13:38    <DIR>          local
2020-01-19  13:55    <DIR>          sbin
2020-01-19  13:56    <DIR>          share
2016-10-25  14:43    <DIR>          src
2019-12-18  11:07    <DIR>          tmp
...

No /usr/bin nor /usr/lib.

> Why not a symbolic link?

Mounts ensure the paths exist and are identical to /bin /lib.

> And which process does this mounting?

Every Cygwin process at startup performs those mounts and any alternatives in
/etc/fstab and /etc/fstab.d/*, see "Cygwin User's Guide", Chapter 3. Using
Cygwin, /The Cygwin Mount Table/:

	http://cygwin.com/cygwin-ug-net/using.html#mount-table

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.

--
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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]