X-Spam-Check-By: sourceware.org Date: Mon, 13 Aug 2007 10:41:24 -0400 (EDT) From: Igor Peshansky Reply-To: cygwin AT cygwin DOT com To: Ronald Fischer cc: cygwin AT cygwin DOT com Subject: Re: How to rename file case-sensitive? In-Reply-To: <387E9FC1619C0849BA8934938037E54F0F5CAF@sv-muc-004.venyon-mail.local> Message-ID: References: <387E9FC1619C0849BA8934938037E54F0F5CAF AT sv-muc-004 DOT venyon-mail DOT local> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 AT cs DOT nyu DOT edu | igor AT watson DOT ibm DOT 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/