🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #15350

Re: A script to find and remove empty directories

#15350
From: Jef Poskanzer
Date: Wed, 26 Feb 1997 00:00
17 lines
1353 bytes
miquels@cistron.nl (Miquel van Smoorenburg):
}find /var/spool/news -type d -empty -depth | xargs -r rmdir

Some versions of find need an explicit -print.  Some versions of find
don't have -empty and/or -depth; the -empty is not necessary, and the
-depth can be replaced with a sort -r step.  I don't even know what the
-r on xargs is for.  This command should work everywhere:

find /var/spool/news -type d -print | sort -r | xargs rmdir
---
Jef

         Jef Poskanzer  jef@acme.com  http://www.acme.com/jef/
          Ph'nglui mglw'nafh Barney R'lyeh wgah'nagl fhtagn.

Technical Details
Message-ID: <5f27vi$58m$1@shell3.ba.best.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
References: <33132F95.54538512@spinne.com> <82ybccj8wr.fsf@parrot.eecs.umich.edu> <3313F711.79B8AA0A@spinne.com> <5f1ja3$1nk$1@Q.cistron.nl>

Show Full Headers
Complete Article Headers
Message-ID: <5f27vi$58m$1@shell3.ba.best.com>
Subject: Re: A script to find and remove empty directories
Date: Wed, 26 Feb 1997 00:00:00 +0000
From: Jef Poskanzer <jef@acme.com>
References: <33132F95.54538512@spinne.com> <82ybccj8wr.fsf@parrot.eecs.umich.edu> <3313F711.79B8AA0A@spinne.com> <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
X-Deja-AN: 221642777
Distribution: inet
Sender: jef@shell3.ba.best.com
Organization: Paratheo-Anametamystikhood Of Eris Esoteric
Reply-To: Jef Poskanzer <jef@acme.com>
Newsgroups: news.software.nntp