[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: mv can't change filename case on case-insensitive file systems
From: |
Jonathan Lennox |
Subject: |
Re: mv can't change filename case on case-insensitive file systems |
Date: |
Thu, 16 Aug 2007 15:33:39 -0400 |
On Thursday, August 16 2007, "John Cowan" wrote to "Eric Blake, John Cowan,
Jonathan Lennox, address@hidden" saying:
> Eric Blake scripsit:
>
> > You missed my earlier remark - since POSIX requires case sensitivity,
> > a case-insensitive file system is not specified by POSIX, therefore,
> > a platform may do whatever it likes with rename(2), including change
> > the case (rather than be a no-op).
>
> Well and good. In fact, however, both Cygwin and the Linux VFAT driver
> do treat rename("Foo", "foo") as a no-op.
No, on Cygwin rename(2) will change file case:
$ touch foo
$ echo *oo
foo
$ perl -e 'rename "foo", "Foo" or die($!)'
$ echo *oo
Foo
$ uname -srvmo
CYGWIN_NT-5.1 1.5.24(0.156/4/2) 2007-01-31 10:57 i686 Cygwin
On Cygwin, rename(2) of regular files just wraps the Windows MoveFile API,
after the usual path transformations and the like.
--
Jonathan Lennox
lennox at cs dot columbia dot edu