This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Two questions: Moving Directories, Ctrl-Z


I'm having a similar issue with the mv command.

Take this directory on Win2000 Server, CYGWIN=tty ntsec, NTFS
[mike@mercury]~/tmp:{143}:$ ls -l
total 0
-rw-r--r--   1 mike     none            0 Mar 16 22:12 AbcDE.txt
-rw-r--r--   1 mike     none            0 Mar 16 22:12 CdEfg.txt
-rw-r--r--   1 mike     none            0 Mar 16 22:12 MIKE.txt
-rwxr-xr-x   1 mike     none           93 Mar 16 22:14 test.sh*
[mike@mercury]~/tmp:{144}:$ cat test.sh
#!/bin/sh
for file in *.txt; do
  TMP=`echo $file | tr "[A-Z]" "[a-z]"`
  mv $file $TMP
done
[mike@mercury]~/tmp:{145}:$ ./test.sh
mv: `AbcDE.txt' and `abcde.txt' are the same file
mv: `CdEfg.txt' and `cdefg.txt' are the same file
mv: `MIKE.txt' and `mike.txt' are the same file

I know I've used a script almost like this before to take uppercase file
names and make them all lower case.

-ME

----- Original Message -----
From: "Christopher Faylor" <cgf@redhat.com>
To: <cygwin@cygwin.com>
Sent: Friday, March 16, 2001 9:08 PM
Subject: Re: Two questions: Moving Directories, Ctrl-Z


> On Fri, Mar 16, 2001 at 06:05:44PM -0800, Mark Allan Young wrote:
> >> On Fri, Mar 16, 2001 at 04:44:31PM -0800, Mark Allan Young wrote:
> >> >One thing I've noticed that changed with our recent upgrade
> >> >to 1.1.8 was that moving a directory now seems to perform a copy
> >> >and remove rather than just renaming a directory.  Is there a way
> >> >to just force the rename?  what's the benefit of the copy over the
> >> >rename?
> >>
> >> I just tried this.  An "mv" in cygwin moves the directory without
> >> copying.
> >>
> >> If it isn't doing this for you we'll need details.
> >
> >I can send an strace if you like, but I'll need to send it directly to
> >you, as it get's pretty long...  is there something else I could do to
> >get you the information you require...?
>
> Before you send an strace, please send some obvious details like type of
> disk (FAT, NTFS), contents of directory, cygcheck output, etc.  A very
> simple test case is always preferable.
>
> cgf
>
> --
> Want to unsubscribe from this list?
> Check out: http://cygwin.com/ml/#unsubscribe-simple
>
>


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]