From owner-freebsd-questions@freebsd.org Sun Jul 1 19:49:05 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF376FD5AA8 for ; Sun, 1 Jul 2018 19:49:05 +0000 (UTC) (envelope-from yasu@utahime.org) Received: from gate.utahime.jp (ipq210.utahime.jp [183.180.29.210]) by mx1.freebsd.org (Postfix) with ESMTP id 46FB37B333 for ; Sun, 1 Jul 2018 19:49:04 +0000 (UTC) (envelope-from yasu@utahime.org) Received: from eastasia.home.utahime.org (eastasia.home.utahime.org [192.168.174.1]) by gate.utahime.jp (Postfix) with ESMTP id A25021DA6C; Mon, 2 Jul 2018 04:48:56 +0900 (JST) Received: from eastasia.home.utahime.org (localhost [127.0.0.1]) by localhost-backdoor.home.utahime.org (Postfix) with ESMTP id 06FE735507; Mon, 2 Jul 2018 04:48:56 +0900 (JST) Received: from localhost (rolling.home.utahime.org [192.168.174.11]) by eastasia.home.utahime.org (Postfix) with ESMTPSA id BE68735506; Mon, 2 Jul 2018 04:48:55 +0900 (JST) Date: Mon, 02 Jul 2018 04:48:31 +0900 (JST) Message-Id: <20180702.044831.477271088854915236.yasu@utahime.org> To: freebsd-questions@freebsd.org Subject: Re: Problem deleting files From: Yasuhiro KIMURA In-Reply-To: <85B4CFC22AC0CA70B917D42D@Pauls-MacBook-Pro.local> References: <85B4CFC22AC0CA70B917D42D@Pauls-MacBook-Pro.local> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2018 19:49:05 -0000 From: Paul Schmehl Subject: Problem deleting files Date: Sun, 01 Jul 2018 14:13:30 -0500 > I have a problem with a directory full of files that I can't seem to > delete. > > rm * returns argument list too long. So does file * > > find . -type f -exec rm [] \; returns rm: []: No such file or > directory over and over again. Try following command. find . -type f -print0 | xargs -0 rm -f If it is only a matter of the number of files, then this should work well. Best, --- Yasuhiro KIMURA