How to rename file case-sensitive?
Igor Peshansky
pechtcha@cs.nyu.edu
Mon Aug 13 14:42:00 GMT 2007
On Mon, 13 Aug 2007, Ronald Fischer wrote:
> Is there an easy way to rename a file foo to Foo?
>
> mv foo Foo
>
> complains that they are the same file. From the FAQ
> I learned that this is due to the limitations of
> Windows which does not distinguish between case
> in file names. The FAQ also says that there is a
> "highly experimental" case-sensitive file system
> available.
>
> Not being prepared yet to live in a highly
> experimental way, I'm curious whether there
> is a simpler solution to the rename problem
> aside from the obvious hack
>
> mv foo bar; mv bar Foo
I use the following (which is essentially a wrapper around the hack):
$ cat /usr/local/bin/mvv
#!/bin/sh
/bin/mv "${1%%/}" "${1%%/}-$$" && mv "${1%%/}-$$" "${2%%/}"
HTH,
Igor
--
http://cs.nyu.edu/~pechtcha/
|\ _,,,---,,_ pechtcha@cs.nyu.edu | igor@watson.ibm.com
ZZZzz /,`.-'`' -. ;-;;,_ Igor Peshansky, Ph.D. (name changed!)
|,4- ) )-,_. ,\ ( `'-' old name: Igor Pechtchanski
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
Belief can be manipulated. Only knowledge is dangerous. -- Frank Herbert
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
More information about the Cygwin
mailing list