delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/01/31/13:15:30

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs
Date: Fri, 31 Jan 2003 13:07:47 -0500 (EST)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Lynn Wilson <lynn AT swcp DOT com>
cc: cygwin <cygwin AT cygwin DOT com>
Subject: Re: annoying problem with 'mv'
In-Reply-To: <3E3AADB5.8040302@swcp.com>
Message-ID: <Pine.GSO.4.44.0301311235120.24195-100000@slinky.cs.nyu.edu>
Importance: Normal
MIME-Version: 1.0

Lynn,

Try strace'ing your mv command to see where the time goes, like so:
	cd /c
	strace -o mv.strace mv OldDir NewDir
and look through /c/mv.strace.  For more info on strace, "man strace"
(which also has a pointer to the web page).  The file may be large, so you
may want to compress it if you intend to post it to the list.
	Igor

On Fri, 31 Jan 2003, Lynn Wilson wrote:

> My understanding of the way that 'mv' works is that it will try to RENAME the
> file or directory in question provided the source and destination are on the
> same partition otherwise it will do a COPY.
>
> If I mv (in the sense of renaming) a large directory that is buried deep in some
>   other directory, it will occur very quickly.  If that same directory happens
> to be rooted at /c, it will take a very long time because it appears to be doing
> a copy.
>
> This has been going on for a long time, but currently I'm running the latest of
> almost everything on a Win2k pro box.
>
> My mount tables are:
> c:\program files on /PF type system (binmode)
> C:\cygwin\bin on /usr/bin type system (binmode)
> C:\cygwin\lib on /usr/lib type system (binmode)
> C:\cygwin on / type system (binmode)
> c: on /c type system (binmode)
> f: on /cvs type system (binmode)
> g: on /kits type system (binmode)
> e: on /e type user (binmode,noumount)
> n: on /n type user (binmode,noumount)
>
> This works:
> cd /c/mystuff
> mv OldDir NewDir
>
> An example of the failure would be:
> cd /c
> mv OldDir NewDir
>
> Is there a reason for this behavior?
>
> Thanks.
> Lynn

-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

Oh, boy, virtual memory! Now I'm gonna make myself a really *big* RAMdisk!
  -- /usr/games/fortune



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019