Why can I see a file that I own in CygWin but not in Windows Explorer?

2

1

I installed Cygwin in Windows 7 and was browsing through the c:/cygwin/ directory in the Cygwin terminal. There exists a directory bin/ at the path c:/cygwin/usr/bin, but I cannot find this folder in Windows Explorer, and I cannot ls this path in CygWin unless I am already in the usr/ folder. It doesn't seem to be hidden, and my Windows user account is the owner of both files. Is there any explanation for why/how this folder can only be reached in a certain way?

File permissions:

molga@Win7Dell /usr
$ ls -l -d "c:/cygwin/usr"
drwxr-xr-x 1 molga Domain Users 0 May 17 10:53 c:/cygwin/usr

molga@Win7Dell /usr
$ ls -l -d bin
drwxr-xr-x+ 1 molga Domain Users 0 Jul 20 08:17 bin

FlyingMolga

Posted 2012-07-20T19:09:39.790

Reputation: 271

Are you sure it’s not hidden? Have you tried selecting the show hidden option in Folder Options? – Synetech – 2012-07-20T19:35:30.497

@Synetech I tried that, and it was still hidden... – FlyingMolga – 2012-07-20T19:47:09.470

Can you open it in Explorer by directly typing it into the address-bar? What about the command-prompt? Can you cd to it in cmd? – Synetech – 2012-07-20T19:53:45.547

It's not accessible through the Explorer address bar or command prompt, either. – FlyingMolga – 2012-07-20T19:57:24.013

Answers

4

Cygwin's mount command will show you that /usr/bin is mapped to C:\Cygwin\bin (which means /usr/bin is the same as /bin). Windows Explorer and Command Prompt of course don't know about Cygwin mounts.

ak2

Posted 2012-07-20T19:09:39.790

Reputation: 3 387

@FlyingMolga it's actually not obvious, so it's really silly to say you feel silly for not realising that. It is very confusing that cygwin has a usr subdirectory with no bin within it, but that its own usr directory maps to bin. – barlop – 2018-01-26T21:39:22.117