From owner-freebsd-questions@FreeBSD.ORG Sat Apr 7 20:44:21 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 8FDF81065675; Sat, 7 Apr 2012 20:44:21 +0000 (UTC) Date: Sat, 7 Apr 2012 20:44:21 +0000 From: Alexander Best To: Matthias Apitz Message-ID: <20120407204421.GA43348@freebsd.org> References: <20120405141506.GA49845@tiny> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120405141506.GA49845@tiny> Cc: freebsd-questions@freebsd.org Subject: Re: order of source_dirs in cp(1) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Apr 2012 20:44:21 -0000 On Thu Apr 5 12, Matthias Apitz wrote: > > Hello, > > I was doing > > $ cp -Rv 10 11 12 13 14 15 16 17 2 /mnt/osm > > and was surprised seeing that source_dir 17 was done before 16; the man > page does not specify the order, but I was thinking it just goes through > the list in the given order... > > Why this is done this way? i can't remember the reason, but the question has been raised quite often. try searching the archives. i think it had something to do with performance or getting better disk locality, but i'm not sure. however people were argueing whether copying the files in reverse order is really a benefit or not. cheers. alex > > Thanks > > matthias > -- > Matthias Apitz > e - w http://www.unixarea.de/ > UNIX since V7 on PDP-11, UNIX on mainframe since ESER 1055 (IBM /370) > UNIX on x86 since SVR4.2 UnixWare 2.1.2, FreeBSD since 2.2.5