Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com From: "Mark Allan Young" To: Subject: RE: Two questions: Moving Directories, Ctrl-Z Date: Fri, 16 Mar 2001 19:16:31 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Importance: Normal In-Reply-To: <20010316202101.A2454@redhat.com> > 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 -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