public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* case sensitive directory names
@ 1997-12-04  1:44 Kevin Hughes
  1997-12-04  9:47 ` Jason Zions
  0 siblings, 1 reply; 8+ messages in thread
From: Kevin Hughes @ 1997-12-04  1:44 UTC (permalink / raw)
  To: Gnuwin95 (E-mail)

I have a bad habit of using upper and lower case names in my directory names - not mixing them but having a directory called UPPERCASE rather than uppercase.

This is no problem on Unix which copes as it handles upper and lower case for the names. NT does not - all files are essentially lower case. Fine I can cope with that but gnuwin appears to remember the name I typed and then uses that in the answer to pwd. Hence can do the following


bash$ pwd
/devel/kh/CC/SC
bash$ cd  ..
bash$ pwd
/devel/kh/CC
bash$ cd sc
bash$ pwd
/devel/kh/CC/sc

Since I have scripts that check "where" I am in a directory structure before they will do anything this gets a bit tedious. I also have scripts which store away the answer to "pwd" and check it next time I try to do things. I

Is there any real reason for this behaviour.? Can I turn it off and force lower case always? 



Kevin

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: case sensitive directory names
@ 1997-12-04  6:19 Earnie Boyd
  1997-12-04 13:02 ` Guy Gascoigne - Piggford
  0 siblings, 1 reply; 8+ messages in thread
From: Earnie Boyd @ 1997-12-04  6:19 UTC (permalink / raw)
  To: kh; +Cc: gnu-win32

>From: Kevin Hughes <kh@wg.icl.co.uk>
>To: "Gnuwin95 (E-mail)" <gnu-win32@cygnus.com>
>Subject: case sensitive directory names
>Date: Thu, 4 Dec 1997 09:41:33 -0800
>
>I have a bad habit of using upper and lower case names in my directory 
names - not mixing them but having a directory called UPPERCASE rather 
than uppercase.
>
>This is no problem on Unix which copes as it handles upper and lower 
case for the names. NT does not - all files are essentially lower case. 
Fine I can cope with that but gnuwin appears to remember the name I 
typed and then uses that in the answer to pwd. Hence can do the 
following
>
>
>bash$ pwd
>/devel/kh/CC/SC
>bash$ cd  ..
>bash$ pwd
>/devel/kh/CC
>bash$ cd sc
>bash$ pwd
>/devel/kh/CC/sc
>
>Since I have scripts that check "where" I am in a directory structure 
before they will do anything this gets a bit tedious. I also have 
scripts which store away the answer to "pwd" and check it next time I 
try to do things. I
>
>Is there any real reason for this behaviour.? Can I turn it off and 
force lower case always? 
>

The real problem is that the underlying file system is case insensitive.  
When you cd, an environment variable is set that the pwd command reads 
and echos.  Because lowercase and LOWERCASE resolve to finding the 
directory then the environment variable will be set to what you keyed on 
the command line.

UNIX's file system on the otherhand is case sensitive.  So if lowercase 
exists and LOWERCASE doesn't then when you cd LOWERCASE you would get an 
error.

What problems is this nature causing?  From your examples I don't see a 
real problem as the directory names should be found in either case.  If 
it is something you really want you could modify the result from the pwd 
command to translate to lowercase.

-        \\||//
---o0O0--Earnie--0O0o----
-earnie_boyd@hotmail.com-
------ooo0O--O0ooo-------


______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 8+ messages in thread
* RE: case sensitive directory names
@ 1997-12-05  1:25 Kevin Hughes
  0 siblings, 0 replies; 8+ messages in thread
From: Kevin Hughes @ 1997-12-05  1:25 UTC (permalink / raw)
  To: 'Jason Zions'; +Cc: Gnuwin95 (E-mail)

-----Original Message-----
From:	Jason Zions [SMTP:jazz@softway.com]
Sent:	Thursday, December 04, 1997 5:47 PM
To:	Kevin Hughes
Cc:	Gnuwin95 (E-mail)
Subject:	Re: case sensitive directory names

It's not gnuwin that "remembers" the original case you typed - it's the
filesystem.

NTFS and FAT16 (under NT, anyway) are case-storing filesystems; Win32 is
case-insensitive when looking at the stored filenames.

Instead of using the bash built-in pwd, use /bin/pwd to get the "real"
working directory in a case-consistent way. /bin/pwd walks the
filesystem to find out where you are, while the bash built-in tracks it
by assuming a starting point and watching the cd commands fly by. (If
you cd through a symlink, I think you'll get wildly different answers
from the builtin pwd and /bin/pwd; I don't know which is more useful to
your scripts.)

Jason


Jason,
	Thanks for the suggestion but you have left me confused. 

The only pwd I know about is the pwd in the bash shell which I thought was the same as the pwd.exe in 
/gnuwin32/b18/H-i386-cygwin32/bin. There is no /bin/pwd

I tried calling the /gnuwin32/b18/H-i386-cygwin32/bin/pwd directly and get exactly the same results as doing pwd

What is the /bin/pwd you are refering to


Kevin



-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~1997-12-05 18:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-12-04  1:44 case sensitive directory names Kevin Hughes
1997-12-04  9:47 ` Jason Zions
1997-12-05 11:30   ` Guy Gascoigne - Piggford
1997-12-05 13:22     ` Jason Zions
1997-12-05 18:45       ` Guy Gascoigne - Piggford
1997-12-04  6:19 Earnie Boyd
1997-12-04 13:02 ` Guy Gascoigne - Piggford
1997-12-05  1:25 Kevin Hughes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).