* 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-04 6:19 case sensitive directory names Earnie Boyd
@ 1997-12-04 13:02 ` Guy Gascoigne - Piggford
0 siblings, 0 replies; 8+ messages in thread
From: Guy Gascoigne - Piggford @ 1997-12-04 13:02 UTC (permalink / raw)
To: Earnie Boyd; +Cc: gnu-win32
At 06:18 AM 12/4/97 PST, you wrote:
>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.
I can give you one poblem that I've noticed. We use Clearcase for source
control, many clearcase commands require knowledge about the Current
Working Directory, now take the following scenario.
I have a directory:
s:\source\Stuff\Project1
if, in bash, I cd //s/source/stuff/project1, it works and appears to set
the current directory correctly, however it actually sets the dir to be
what was typed case and all), future pwd calls return the lowercase name
and not the real mixed case name, this causes Clearcase all kinds of problems.
Now I realise that part of the problem here is that Clearcase's handling of
a case insensitive filesystem is somewhat lacking, but the behaviour of the
Cygwin cd command is also somewhat lacking. Having not looked at it, I
can't say exactly where the problem lies, but it would be nice to fix it
one day.
Guy
-
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 13:22 ` Jason Zions
@ 1997-12-05 18:45 ` Guy Gascoigne - Piggford
0 siblings, 0 replies; 8+ messages in thread
From: Guy Gascoigne - Piggford @ 1997-12-05 18:45 UTC (permalink / raw)
To: Jason Zions; +Cc: gnu-win32
At 02:23 PM 12/5/97 -0700, you wrote:
>Sorry one and all - I thought gnuwin had a /bin/pwd that was distinct
>from the shell built-in. Might actually be a useful tool to build - one
>that uses Win32 calls to get the precise as-stored pathname of the
>current directory.
Oh there is a separate executable, though it's in
C:\gnuwin32\b18\H-i386-cygwin32\bin rather than \bin. Either way, it
returns the same thing as the builtin.
Guy
-
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 11:30 ` Guy Gascoigne - Piggford
@ 1997-12-05 13:22 ` Jason Zions
1997-12-05 18:45 ` Guy Gascoigne - Piggford
0 siblings, 1 reply; 8+ messages in thread
From: Jason Zions @ 1997-12-05 13:22 UTC (permalink / raw)
To: Guy Gascoigne - Piggford; +Cc: Jason Zions, gnu-win32
Sorry one and all - I thought gnuwin had a /bin/pwd that was distinct
from the shell built-in. Might actually be a useful tool to build - one
that uses Win32 calls to get the precise as-stored pathname of the
current directory.
Jason
-
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 9:47 ` Jason Zions
@ 1997-12-05 11:30 ` Guy Gascoigne - Piggford
1997-12-05 13:22 ` Jason Zions
0 siblings, 1 reply; 8+ messages in thread
From: Guy Gascoigne - Piggford @ 1997-12-05 11:30 UTC (permalink / raw)
To: Jason Zions; +Cc: gnu-win32
At 10:47 AM 12/4/97 -0700, you wrote:
>It's not gnuwin that "remembers" the original case you typed - it's the
>filesystem.
Whilst this may be true, what I see happening is that under bash (and not
under cmd.exe) if I cd to a directory with the name typed in lowercase,
certain other non-cygwin programs (clearcase) inherit this wrong pathname.
To me this means that he problem is separate from bash' intrenal concept of
what the CWD is.
>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.)
Well, actually /bin/pwd prints out the same 'wrong case' version of the CWD
as bash does.
Guy
-
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
* Re: case sensitive directory names
1997-12-04 1:44 Kevin Hughes
@ 1997-12-04 9:47 ` Jason Zions
1997-12-05 11:30 ` Guy Gascoigne - Piggford
0 siblings, 1 reply; 8+ messages in thread
From: Jason Zions @ 1997-12-04 9:47 UTC (permalink / raw)
To: Kevin Hughes; +Cc: Gnuwin95 (E-mail)
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
-
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
* 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
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 6:19 case sensitive directory names Earnie Boyd
1997-12-04 13:02 ` Guy Gascoigne - Piggford
-- strict thread matches above, loose matches on Subject: below --
1997-12-05 1:25 Kevin Hughes
1997-12-04 1:44 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
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).