From owner-freebsd-current Sat Apr 21 5:26:36 2001 Delivered-To: freebsd-current@freebsd.org Received: from bremen.shuttle.de (bremen.shuttle.de [194.95.249.251]) by hub.freebsd.org (Postfix) with ESMTP id 6ABFF37B422; Sat, 21 Apr 2001 05:26:33 -0700 (PDT) (envelope-from schweikh@schweikhardt.net) Received: by bremen.shuttle.de (Postfix, from userid 10) id C965517D25; Sat, 21 Apr 2001 14:26:17 +0200 (CEST) Received: (from schweikh@localhost) by hal9000.schweikhardt.net (8.11.1/8.11.1) id f3LBIvm06780; Sat, 21 Apr 2001 13:18:57 +0200 (CEST) (envelope-from schweikh) Date: Sat, 21 Apr 2001 13:18:57 +0200 From: Jens Schweikhardt To: Mike Smith Cc: freebsd-current@freebsd.org Subject: Re: cp -d dir patch for review (or 'xargs'?) Message-ID: <20010421131857.B4574@schweikhardt.net> References: <20010420235419.B1276@schweikhardt.net> <200104202214.f3KMEAf06331@mass.dis.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200104202214.f3KMEAf06331@mass.dis.org>; from msmith@freebsd.org on Fri, Apr 20, 2001 at 03:14:10PM -0700 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, Apr 20, 2001 at 03:14:10PM -0700, Mike Smith wrote: # > # > Folks, # > # > although there was much rejoicing, I think there's no need for a # > new option to cp. Just use the toolbox, it's not too hard: # > # > (cat bigfilelist; echo destdir) | xargs cp # > # > Or even # > # > echo destdir >>bigfilelist # > xargs cp < bigfilelist # > # > should do the trick. # # No, it won't. Consider a list of files a, b, c, d. You create input to # xargs 'a b c d destdir', which it then splits into 'a b c' and 'd # destdir'. The first time cp is run, it will probably fail; the second # time only 'd' ends up where you expect it. You mean if bigfilelist list exceeds the -n limit of xargs (default 5000)? Yes, you'll be surprised then. It was a bit of POLA violation for me when I found xargs would by default use 5000 arg chunks and not all in one go. I'd rather get rid of kern.argmax and the limitations of the exec familiy. Yes, I'm dreaming :-) Regards, Jens -- Jens Schweikhardt http://www.schweikhardt.net/ SIGSIG -- signature too long (core dumped) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message