From owner-freebsd-stable@FreeBSD.ORG Sun Jan 22 19:43:24 2012 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31513106574C for ; Sun, 22 Jan 2012 19:43:24 +0000 (UTC) (envelope-from cliftonr@volcano.org) Received: from gateway13.websitewelcome.com (gateway13.websitewelcome.com [69.93.154.15]) by mx1.freebsd.org (Postfix) with ESMTP id E9C578FC18 for ; Sun, 22 Jan 2012 19:43:23 +0000 (UTC) Received: by gateway13.websitewelcome.com (Postfix, from userid 5007) id EFD289EDE1263; Sun, 22 Jan 2012 13:43:22 -0600 (CST) Received: from gator1313.hostgator.com (gator1313.hostgator.com [174.37.241.130]) by gateway13.websitewelcome.com (Postfix) with ESMTP id CFD7B9EDE120A for ; Sun, 22 Jan 2012 13:43:22 -0600 (CST) Received: from localhost ([127.0.0.1]:60273 helo=gator1313.hostgator.com) by gator1313.hostgator.com with esmtpa (Exim 4.69) (envelope-from ) id 1Rp3Jy-0003yd-At; Sun, 22 Jan 2012 13:43:22 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Sun, 22 Jan 2012 13:43:22 -0600 From: cliftonr@volcano.org To: Matthew Seaman In-Reply-To: <4F1C609B.3010800@infracaninophile.co.uk> References: <20120111161110.4258969c.rpclark@tds.net> <20120112200843.2a348d2f.rpclark@tds.net> <4F0F8E6F.8000909@FreeBSD.org> <74dee0a775b93db4771f4de96eaf86c2@volcano.org> <4F1C609B.3010800@infracaninophile.co.uk> Message-ID: X-Sender: cliftonr@volcano.org User-Agent: Roundcube Webmail/0.6 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator1313.hostgator.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - volcano.org X-BWhitelist: no X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: localhost (gator1313.hostgator.com) [127.0.0.1]:60273 X-Source-Auth: cliftonr@volcano.org X-Email-Count: 3 X-Source-Cap: Y2xpZnRvbnI7Y2xpZnRvbnI7Z2F0b3IxMzEzLmhvc3RnYXRvci5jb20= Cc: freebsd-stable@freebsd.org Subject: Re: GENERIC make buildkernel error / fails - posix_fadvise X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jan 2012 19:43:24 -0000 On 22.01.2012 13:16, Matthew Seaman wrote: > On 22/01/2012 19:00, cliftonr@volcano.org wrote: >> If rm had an option to take files from standard input, or if >> there's another program I'm not aware of which does this, it >> could serve as the right-hand side of this. > > xargs(1) -- generic solution to taking a list of command arguments > from > a file or pipe, and building a command line from them. ... > xargs(1) is very commonly used in pipelines with find(1). Thanks for making it clear that my comment was unclear. :-) I had meant a program which reads the input file list as xargs does and operates directly on its operands as xargs does I'm very familiar with xargs, and have used it in many a shell script. However, it has the weakness that it will end up doing many invocations on the executable operand, as it batches up the input into command line arguments. I don't know to what extent that overhead would compare to the other sources of overhead discussed earlier, or the overhead of executing a Perl interpreter opcode per input, but I'd guess it's higher. I think I tried that specific comparison of xargs rm vs. perl -nle unlink once, some years ago, for some kind of temp file cleanup, and found the latter was faster. I don't have any numbers though, and if I did they'd be long out of date. -- Clifton -- Clifton Royston -- cliftonr@iandicomputing.com / cliftonr@volcano.org Custom programming, network design, systems and network consulting services