delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/07/22/11:58:44

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:message-id:date:from:mime-version:to:subject
:references:in-reply-to:content-type:content-transfer-encoding;
q=dns; s=default; b=wWs1JKi4sMXNz5GR30wzab801VwHZEJG67WCSKdGVV9
usNnRKQcn/nWbmzY+ip61z2ezLfiB073GE/z7O/9sT9obmoEq+6291sYujYN5YGB
Ungy6BjmLjrusSDU5Jat1mElg53sWGQGB9cD6y9/o5udPQigcPD8cjGGHENab2lM
=
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:message-id:date:from:mime-version:to:subject
:references:in-reply-to:content-type:content-transfer-encoding;
s=default; bh=00qdZi8+x2QMw6CFikR+Bs3WL8w=; b=xrygigGNifxFfTtG7
pkMpWF7uufgX9LqBX6wrjf/2JWCJ0+IEWqSKL2Unkr1eaSR17NdDpjbEGgP0tkVa
o6znAtjvK+hM0JE4MZekd0Kn7uKnkKkt+fzDKe+PjPieMNNiEm+pOdgWwudg8S1h
ITpxuac4J0o3LwxhQwy1txvesA=
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-Virus-Found: No
X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.2
X-HELO: etr-usa.com
Message-ID: <53CE8A1D.7010703@etr-usa.com>
Date: Tue, 22 Jul 2014 09:58:21 -0600
From: Warren Young <warren AT etr-usa DOT com>
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0
MIME-Version: 1.0
To: Cygwin-L <cygwin AT cygwin DOT com>
Subject: Re: Caveats for removing /cygdrive prefix?
References: <53CE4D27 DOT 9010900 AT codespunk DOT com>
In-Reply-To: <53CE4D27.9010900@codespunk.com>
X-IsSubscribed: yes

On 7/22/2014 05:38, Matt D. wrote:
> I've always used Cygwin's fstab /cygdrive default but I'm growing tired
> of always typing it out; msys's simple "/a" "/c" "/d" prefix for drive
> letters always seemed closer to home while on a Windows machine.

It's not clear to me from your message if you know this, but it's easy 
to get that behavior on Cygwin.  Just change the cygdrive line in 
/etc/fstab to:

     none / cygdrive binary,posix=0,user 0 0

I've been running this way for many years now, and I have never traced 
any problem I've had with Cygwin to this practice.

> The only problem I've encountered is a borked ls display when an actual
> folder "a", "b", etc., appears in the Cygwin root folder

I can't think of a good justification for creating single-letter folder 
names at the top level of a volume, so this seems like a problem that 
isn't likely to come up.

> the inability to enumerate drive with "ls /cygdrive".

I think that's actually a feature.  Notice that "ls /" also doesn't 
include "cygdrive".  If it did, you'd get duplicate entries in "find /" 
commands, the locate(1) DB, etc.

> Also, it would be nice if doing a directory list on /cygdrive was a
> hard-coded operation, to preserve this functionality.

That causes duplicate entries when you use the fstab solution.

For example, "find / -name sh.exe" would turn up both /bin/sh.exe and 
/c/cygwin/bin/sh.exe.

If the Cygwin filesystem naming scheme were perfect, you could say "find 
-name sh" and get the same results.  And then if you demand that 
find(1)'s readdir() calls include both sh and sh.exe entries to fix 
this, now you've created another duplicate entry problem.

The Windows to POSIX translation will always be imperfect.

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

- Raw text -


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