From: lhall AT rfk DOT com (Larry Hall) Subject: Re: Mounts and relative pathnames 12 Mar 1998 16:36:42 -0800 Message-ID: <3.0.5.32.19980312093704.00946880.cygnus.gnu-win32@pop.ma.ultranet.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" To: Kenneth Chiu Cc: gnu-win32 AT cygnus DOT com At 12:02 AM 3/12/98 -0500, Kenneth Chiu wrote: >On Tue, 10 Mar 1998, Larry Hall wrote: >> At 11:58 AM 3/9/98 -0500, Kenneth Chiu wrote: >> >I seem to have a problem with 'ls' and relative pathnames. I have >> >searched the FAQ and the mailing list archives, but haven't found >> >anything. Suppose I do the following sequence: >> > >> > mount N:/root / >> > mount N:/dir1 /usr >> > cd / >> > ls usr >> > >> >I would expect to see the contents of N:/dir1, but instead I see >> >nothing. If I type 'ls /usr', I see what I expect, so I think I'm >> >executing the correct 'ls'. If I type 'cd usr', and then 'ls', I >> >also see what I expect. >> >> There you have to create a directory to mount to (in this case 'usr') >> before the mount would succeed. Now, granted, if you follow this procedure, >> its likely not going to work quite as you expect either. > >Hmm...if I don't create the directory before the mount, then nothing >seems to show up if I go to the parent and do 'ls'. > You got it! Under the traditional UNIX environment, the directory HAS to exist before doing a mount, otherwise the mount WILL fail. Not true under cygwin. Still with UNIX behavior as a model, I think it makes sense that ls in the parent shows nothing if all you have is a mount in a mount table and no indication of that mount in the filesystem. Making the directory first in cygwin solves this problem but doing an ls of "usr" when you're in "/" will show you what's in the "usr" directory, not what's in the mount. This is also different from UNIX behavior, where the mount point hides the underlying (not necessarily empty) directory. I think its fair to call this aberration a bug. Until its fixed, I recommend using the symbolic link option I mentioned originally. Its not perfect either but it gets allot closer to what one might otherwise expect... Larry Hall lhall AT rfk DOT com RFK Partners, Inc. (781) 239-1053 8 Grove Street (781) 239-1655 - FAX Wellesley, MA 02181 http://www.rfk.com - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".