From owner-freebsd-questions@FreeBSD.ORG Fri Feb 10 15:34:22 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 0F619106564A for ; Fri, 10 Feb 2012 15:34:22 +0000 (UTC) (envelope-from henry.olyer@gmail.com) Received: from mail-wi0-f182.google.com (mail-wi0-f182.google.com [209.85.212.182]) by mx1.freebsd.org (Postfix) with ESMTP id 950D28FC0A for ; Fri, 10 Feb 2012 15:34:21 +0000 (UTC) Received: by wibhn14 with SMTP id hn14so3106536wib.13 for ; Fri, 10 Feb 2012 07:34:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=TZ3bTef1P70pnLfnKXIfBlEqMLdVLp52t6T1KFMlwAw=; b=RFjWwgyO/Nsedf/n0MZTgCSLSNeVPVG1Dy2K9jjt+T+4WC2JITpsLPANARQDf66lWD pBblN6Qcjub/uD3r978bfkeT26yY/4WCKf8jaR4GSCN+DhdAy34MQOQyh/9kqW6RRxjp SNyBcM9jcgXXB81i1Kvnbb+rwcOxQO7x8Hzfo= MIME-Version: 1.0 Received: by 10.180.80.8 with SMTP id n8mr10044178wix.14.1328888060654; Fri, 10 Feb 2012 07:34:20 -0800 (PST) Received: by 10.216.184.198 with HTTP; Fri, 10 Feb 2012 07:34:20 -0800 (PST) In-Reply-To: <20120209032544.GA58560@ozzmosis.com> References: <1237723287.20120207235924@yandex.ru> <4F31A260.20109@infracaninophile.co.uk> <20120207231716.31aa8bc3@gumby.homeunix.com> <20120209032544.GA58560@ozzmosis.com> Date: Fri, 10 Feb 2012 10:34:20 -0500 Message-ID: From: Henry Olyer To: andrew clarke Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-questions@freebsd.org 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: Fri, 10 Feb 2012 15:34:22 -0000 So what do I change if I want to increase the shell's file limit? I use bash 4. And by the way, for me, part of the normal installation of a new FBSD box is to make certain changes. For example, for "uniq -c" I use "%06" instead of "%d" because this way I can sort the output. Things like that. I never learned a shell language. I suppose no one is as dumb as someone who choose's not to learn, so, what's the right one. csh?, because I do a lot of scientific work?, or should I be looking at another? On Wed, Feb 8, 2012 at 10:25 PM, andrew clarke wrote: > On Tue 2012-02-07 23:17:16 UTC+0000, RW (rwmaillists@googlemail.com) > wrote: > > > On Tue, 07 Feb 2012 22:14:56 +0000 > > Matthew Seaman wrote: > > > > > ls -1 | xargs rm > > > > but be aware that that wont work for filenames with spaces. > > 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. > > The above will also try to 'rm' directories, which won't work. > > Instead I would use 'find': > > find . -type f -depth 1 -delete > > This will also work with filenames with spaces. > > Or the scenic route, using xargs, with one rm per file (slower): > > find . -type f -depth 1 -print0 | xargs -n1 -0 rm -f > > (The "scenic route" is useful if you want to do something else with > the files instead of deleting them with rm.) > > Regards > Andrew > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to " > freebsd-questions-unsubscribe@freebsd.org" >