From owner-freebsd-questions@FreeBSD.ORG Sun Jan 29 03:27:24 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 14E7516A420 for ; Sun, 29 Jan 2006 03:27:24 +0000 (GMT) (envelope-from bill@celestial.com) Received: from mail.mi.celestial.com (dagney.celestial.com [192.136.111.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id BD0CC43D46 for ; Sun, 29 Jan 2006 03:27:23 +0000 (GMT) (envelope-from bill@celestial.com) Received: from localhost (localhost [127.0.0.1]) by mail.mi.celestial.com (Postfix) with ESMTP id 1E37E1D8C7; Sat, 28 Jan 2006 19:27:23 -0800 (PST) Received: from mail.mi.celestial.com ([127.0.0.1]) by localhost (alexis.mi.celestial.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 80578-05-4; Sat, 28 Jan 2006 19:27:22 -0800 (PST) Received: by mail.mi.celestial.com (Postfix, from userid 203) id BE06B1D8C6; Sat, 28 Jan 2006 19:27:22 -0800 (PST) Date: Sat, 28 Jan 2006 19:27:22 -0800 From: Bill Campbell To: freebsd-questions@freebsd.org Message-ID: <20060129032722.GB85318@alexis.mi.celestial.com> Mail-Followup-To: freebsd-questions@freebsd.org References: <927ad6550601271534r17a6ddb2jd90b930f744d170f@mail.gmail.com> <9873AD032E93C851484DF81B@utd59514.utdallas.edu> <200601281733.47099.kirk@strauser.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200601281733.47099.kirk@strauser.com> User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: amavisd-new at mi.celestial.com Subject: Re: rm - Argument list too long X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd@celestial.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jan 2006 03:27:24 -0000 On Sat, Jan 28, 2006, Kirk Strauser wrote: >On Friday 27 January 2006 17:52, Paul Schmehl wrote: >> for files in *.* >> do >> rm $files >> done > >Don't ever, *EVER* blindly unlink glob expansions. It's bad for you. > >Instead, use something like: > > find . -name 'sess.*' -delete While that's good advice, it doesn't answer the question of argument list too long. The short answer is read ``man xargs''. find . | xargs command Bill -- INTERNET: bill@Celestial.COM Bill Campbell; Celestial Systems, Inc. URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 ``A Democracy cannot exist as a permanent form of government. It can only exist until the voters discover they can vote themselves largesse out of the public treasury. From the moment on the majority always votes for the candidate promising the most benefits from the public treasury with the result that Democracy always collapses over a loose fiscal policy, always to be followed by a Dictatorship.'' Professor Alexander Fraser Tytler. 1801