delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/03/24/02:17:53

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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
Date: Thu, 24 Mar 2005 18:17:19 +1100 (EST)
From: Luke Kendall <luke DOT kendall AT cisra DOT canon DOT com DOT au>
Subject: Path confusion
To: cygwin AT cygwin DOT com
MIME-Version: 1.0
Message-Id: <20050324071719.DAFA8834E0@pessard.research.canon.com.au>

Here's something that stunned me: I see different contents of a
directory I want to be "empty-ish" (c:/cygwin/home), depending on how I
refer to it.  I think it's because sometimes, "c:/cygwin" == "/".

$ cygpath -m /
C:/cygwin

$ ls c:/cygwin/home
00-THIS-DIRECTORY-SHOULD-BE-EMPTY.txt

$ cd c:/cygwin/home
$ ls   # Doesn't produce: 00-THIS-DIRECTORY-SHOULD-BE-EMPTY.txt !!!
Administrator             README.txt    cameron        luke       temp
Guest                     aplsrv.log    demos          luke.okay  test.prn
HelpAssistant             aplsrv01.log  desktop.ini    raphael    test.prn.pdf
James - xyz manipulation  aplsrv02.log  docs           scotty
My Music                  aplsrv03.log  hcp-tools      share
My Pictures               bad           hcp-tools-old  stephene

In other words, in c:/cygwin, ls ./home has produced a listing of
d:/home, aka /home.  It's as if Cygwin's internal logic has said,
c:/cygwin is "/", therefore find "home" under "/".

Surely that's broken normal Unix file system semantics?  If it's not a
bug, but a feature, can anyone explain it?  To me it's mind-bogglingly
confusing.

By way of some background, we undo Cygwin's default setup of home to
achieve one thing.

We absolutely don't want home directories to be "inside" Cygwin, since
removing Cygwin would also remove the user files.  We don't even want
the home directory on the C: drive, since re-installing Windows would
also remove the user files.

$ mount
C:\cygwin\bin on /usr/bin type system (textmode)
C:\cygwin\lib on /usr/lib type system (textmode)
C:\cygwin on / type system (textmode)
D:\home on /home type system (textmode)
c: on /cygdrive/c type system (textmode,noumount)
d: on /cygdrive/d type system (textmode,noumount)
l: on /cygdrive/l type system (textmode,noumount)
p: on /cygdrive/p type system (textmode,noumount)
u: on /cygdrive/u type system (textmode,noumount)
w: on /cygdrive/w type system (textmode,noumount)
x: on /cygdrive/x type system (textmode,noumount)
y: on /cygdrive/y type system (textmode,noumount)

This is with a new install of a very current Cygwin:

$ cygcheck -s | grep "^cygwin "
cygcheck: dump_sysinfo: GetVolumeInformation() failed: 67
cygwin                  1.5.13-1

Have I misunderstood something?

Regards,

luke


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019