From owner-freebsd-questions Sat Jan 19 2:17:51 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mail.broadpark.no (mail.broadpark.no [217.13.4.2]) by hub.freebsd.org (Postfix) with ESMTP id 2196837B417 for ; Sat, 19 Jan 2002 02:17:49 -0800 (PST) Received: from ninja.amphex.com (ninja.amphex.com [217.13.29.51]) by mail.broadpark.no (Postfix) with SMTP id 83740807C for ; Sat, 19 Jan 2002 11:17:47 +0100 (MET) Date: Sat, 19 Jan 2002 11:17:46 +0100 From: J.S. To: freebsd-questions@freebsd.org Subject: How to delete only empty directories Message-Id: <20020119111746.7fea5191.johann@broadpark.no> X-Mailer: Sylpheed version 0.6.5 (GTK+ 1.2.10; i386--freebsd4.4) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi. I was in the middle of downloading heaps of directories with lftp, while suddenly an error occured (I forgot to tell lftp I just changed my account password), thus lftp created all the directories it had collected the information of, and they became, ofcourse, empty. Now I need to delete those empty directories and _only_ the empty directories. Does anyone know how? I did a "find ./ -type d -empty > ../empties" to at least get control over what I need to remove. But it is like several hundred directories and I ain't planning on doing it all manually =) Besides, I don't know how to script so I'd really appreciate some help from the mighty audience. Thanks. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message