Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Jan 2002 11:17:46 +0100
From:      J.S. <johann@broadpark.no>
To:        freebsd-questions@freebsd.org
Subject:   How to delete only empty directories
Message-ID:  <20020119111746.7fea5191.johann@broadpark.no>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020119111746.7fea5191.johann>