From owner-freebsd-questions@FreeBSD.ORG Sat Feb 11 13:18:37 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E2A71065676 for ; Sat, 11 Feb 2012 13:18:37 +0000 (UTC) (envelope-from rwmaillists@googlemail.com) Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 8F2278FC0A for ; Sat, 11 Feb 2012 13:18:36 +0000 (UTC) Received: by werm13 with SMTP id m13so3891157wer.13 for ; Sat, 11 Feb 2012 05:18:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=date:from:to:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type:content-transfer-encoding; bh=rMxfzvLfVNkab4/a/dEFWQEG6uLbFdkZaoEU08e0wsc=; b=cw1Kpf2OQiyIWJ3ZDtYikvMFlws8E5s4i+A8H+DQUA/T325AZDaccRgosBXabQsCNQ WXymPSB+zeVC+zYLtQ4GDbk8PJVctyebXqvf5figtiQBCYPTErySr2CtiL2INMKGizsO SZYoMG9ok/t8/cGHECEFB3wfzg2AyouZXL5Hk= Received: by 10.216.133.26 with SMTP id p26mr2196327wei.36.1328966315545; Sat, 11 Feb 2012 05:18:35 -0800 (PST) Received: from gumby.homeunix.com (87-194-105-247.bethere.co.uk. [87.194.105.247]) by mx.google.com with ESMTPS id m8sm27526982wia.11.2012.02.11.05.18.32 (version=SSLv3 cipher=OTHER); Sat, 11 Feb 2012 05:18:33 -0800 (PST) Date: Sat, 11 Feb 2012 13:18:31 +0000 From: RW To: freebsd-questions@freebsd.org Message-ID: <20120211131831.0b48d569@gumby.homeunix.com> In-Reply-To: <20120211010514.GA54353@ozzmosis.com> References: <1237723287.20120207235924@yandex.ru> <4F31A260.20109@infracaninophile.co.uk> <20120207231716.31aa8bc3@gumby.homeunix.com> <20120209032544.GA58560@ozzmosis.com> <4F3541D6.5080505@infracaninophile.co.uk> <20120211010514.GA54353@ozzmosis.com> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.6; amd64-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: 'rm' Can not delete files 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, 11 Feb 2012 13:18:37 -0000 On Sat, 11 Feb 2012 12:05:14 +1100 andrew clarke wrote: > On Fri 2012-02-10 16:12:06 UTC+0000, Matthew Seaman > (m.seaman@infracaninophile.co.uk) wrote: > > > > In addition, I don't believe it solves the OP's initial problem > > > of the argument list being too long! You'd probably need to use > > > the xargs -n switch here. > > > > Go and read the xargs(1) man page carefully. xargs is specifically > > designed to avoid arglist overflows. > > Ah, I grepped for 'limit' and 'overflow', didn't see anything > applicable, and didn't notice the -s switch. That it avoids arglist > overflows should perhaps be written more obviously in the man page > (though I'm not sure how...) The important passage is the description of what xargs does: "Any arguments specified on the command line are given to utility upon each invocation, followed by some number of the arguments read from the standard input of xargs. This is repeated until standard input is exhausted." It would be extremely perverse to go to the trouble of breaking-up stdin into chunks, but to choose a size that's too big to pass to the utility. You expect a man page to document perversity, but not to document all the perverse thing that aren't done.