🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #15384

Re: A script to find and remove empty directories

#15384
From: Miquel van Smoorenburg
Date: Wed, 26 Feb 1997 00:00
25 lines
1711 bytes
In article <3313F711.79B8AA0A@spinne.com>,
Jeff Garzik  <jeff.garzik@spinne.com> wrote:
>Michael Hucka wrote:
>> >>>>> On 25 Feb 1997, Jeff Garzik <jeff.garzik@spinne.com> wrote:
>>   JG> Here is a quick and dirty Perl script that removes empty directories
>>   JG> recursively.  There may be some way to do this with shell utils, but it
>>   JG> was faster for me to simply write this.  :) It should be easy to modify
>>   JG> the output to show newsgroups removed, for logging purposes or
>>   JG> whatever.
>
>> I don't mean this in any rude way, but it turns out there are probably a
>> half-dozen other programs available to do this task.
>
>
>Actually the programs in the areas you cite clean up, in one shape or
>another, *files*.  Most are meant to be piped to fastrm.  There was one
>script, dropgroup, on Stephen Jones' script page that came close to what
>I was looking for, but even then there was not an rmdir to be found.

find /var/spool/news -type d -empty -depth | xargs -r rmdir

Mike.

Technical Details
Message-ID: <5f1ja3$1nk$1@Q.cistron.nl>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
References: <33132F95.54538512@spinne.com> <82ybccj8wr.fsf@parrot.eecs.umich.edu> <3313F711.79B8AA0A@spinne.com>

Show Full Headers
Complete Article Headers
Message-ID: <5f1ja3$1nk$1@Q.cistron.nl>
Subject: Re: A script to find and remove empty directories
Date: Wed, 26 Feb 1997 00:00:00 +0000
From: miquels@cistron.nl (Miquel van Smoorenburg)
References: <33132F95.54538512@spinne.com> <82ybccj8wr.fsf@parrot.eecs.umich.edu> <3313F711.79B8AA0A@spinne.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
X-Deja-AN: 221570170
Organization: Cistron Internet Services B.V.
X-Server-Date: 26 Feb 1997 15:02:48 GMT
Newsgroups: news.software.nntp