From owner-freebsd-current@FreeBSD.ORG Sun Nov 20 20:27:10 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EF5CA16A41F for ; Sun, 20 Nov 2005 20:27:10 +0000 (GMT) (envelope-from kientzle@freebsd.org) Received: from kientzle.com (h-66-166-149-50.snvacaid.covad.net [66.166.149.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id E45C043D46 for ; Sun, 20 Nov 2005 20:27:09 +0000 (GMT) (envelope-from kientzle@freebsd.org) Received: from freebsd.org (p54.kientzle.com [66.166.149.54]) by kientzle.com (8.12.9/8.12.9) with ESMTP id jAKKR9OZ015779; Sun, 20 Nov 2005 12:27:09 -0800 (PST) (envelope-from kientzle@freebsd.org) Message-ID: <4380DC1A.9030201@freebsd.org> Date: Sun, 20 Nov 2005 12:27:06 -0800 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4) Gecko/20031006 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Brian Candler References: <20051116161540.GB4383@uk.tiscali.com> <437F7E22.5050800@freebsd.org> <20051120192914.GC19572@uk.tiscali.com> In-Reply-To: <20051120192914.GC19572@uk.tiscali.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org Subject: Re: Order of files with 'cp' X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Nov 2005 20:27:11 -0000 Brian Candler wrote: > On Sat, Nov 19, 2005 at 11:33:54AM -0800, Tim Kientzle wrote: >>Brian Candler wrote: >> >>>I've noticed on FreeBSD-5.4 and -6.0 that the order in which 'cp' copies >>>multiple files does not match the order they're given on the command line. >> >>My suggestion: Have 'cp' call fts_open once for each >>command-line argument, .... > > Erm, but that just undoes the reason for calling fts_open with mastercmp in > the first place, which is to get it to pick files before directories (or > vice versa, as its behaviour seems to be) as an 'optimisation'. Why is that an optimization? I thought the whole point of this thread was that users expect utilities to process the command-line arguments in the order they're given. Tim