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



> 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 tried this again and it started to do a copy...

then I looked around my system and found another cygwin window
opened to a directory within the directory that I was trying to
move.

when I deleted this window, it did an immediate move (ie a rename).

I decided to do a test.

I create a window and cd'd into a subdirectory, call it woof/tools/ctools

then I cd'd to "woof" and typed "mv tools tools.old".  it started to copy.
I let it go and it got an error:

    rune> mv tools tools.old
    mv: cannot remove directory `tools/ctools': Permission denied
    mv: cannot remove directory `tools': Directory not empty
    mv: cannot remove `tools': Directory not empty
    rune> ls tools.old
    CVS/      build/       classHierarchyPl/  e.1   e.2   gfxdiag/
installers/  s/
    ListLib/  ccdoc_v07a/  ctools/            e.1~  e.2~  igen/     release/
to_png/
    rune> ls tools
    ctools/
    rune> ls tools/ctools
    rune>

It seems to me that if the code knew enough to do the copy, it
could assume that something in the directory was busy and not start
the copy in the first place...  it's nice that it does the copy, but
it takes forever, and if you should happen to <ctrl>-c it, it quits
haveway through the move (which is counterintuitive, given the fact
that a "mv" of a directory is almost always atomic...

...myoung


--
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]