Niall wrote:
>> On Wed, Sep 09, 1998 at 07:56:25PM +0100, Ross Lynch wrote:
>> > Here's the scenario, I wanted to quickly change the name of a file which
> > was in upper case to lower case. So, first of all I tried 'mv FILE.HTML
> > file.html' - alas, bash told me these were the same file. So, I then
> > tried 'mv FILE.HTML file.html1' and 'mv file.html1 file.html' followed
> > by 'rm FILE.HTML'. All had then disappeared! Why is bash acting as if it
> > wasn't case sensitive? These files are on a Windows partition should
> > that matter
>> Elementary rule of problem solving (apologies to Ken) - first check your
> hypothesis. You thought that being on a Windows partition might matter, so
> did you try the exercise on an ext2 partition ? If you had, you would have
> seen that the problem didn't exist on such a partition. The problem is
> indeed related to the files being on a Windows partition. Windows' VFAT
> filesystem is case preserving but case insensitive i.e. if you make a file
> called Fred, it will keep that name, but you won't be able to make another
> file called fred in the same directory, because the filesystem can't
> distinguish between a file called fred and one called Fred.
>> When playing with a Windows filesystem on which I have a directory called
> Games, I tried to mv Games GAMES and got the error message
>> mv: cannot move Games' to a subdirectory of itself, GAMES/Games'
>> The joys of case preserving but insensitive filesystems. (Not a Windows
> exclusive - the MacOS' Finder does this too).
>> BTW the new versions of Bash (2.xx) do have some semantics which help in
> dealing with such filesystems. If the shell option nocaseglob is enabled
> then Bash matches names in pathname expansion without regard to case. That,
> and the nullglob option, can hurt your head if you're not careful.
>
Hmm, okay, thanks. I was almost sure I had done this before though.
Musta been ext2 I guess.
> Regards,
>> Niall O Broin
--
Ross Lynch
Onesphere Technologies
http://www.onesphere.net
+353 (0)87 6548827
ross at onesphere.net
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!