Re: Joe [and MANY others] doesn't delete its config directory[ies] on purge
On Tue, Feb 12, 2002 at 11:44:05AM +0100, Francesco P. Lovergine wrote:
> Yes, but you should run that tricks more and more times.
> Some dirs contains dirs which contain empty dirs ;)
> So the script is
>
> while [ `find /etc -type d -empty|wc -l` != 0 ]
> do
> find /etc -type d -empty|xargs rmdir
> done
Or you could use -depth.
(It'd also fail on directories beginning with a hyphen without "rmdir
--", when there are no matching directories without xargs -r, and
fail on directories with spaces in the filename without -print0/-0.)
This shouldn't be necessary, of course (ideally, empty config dirs
shouldn't be left behind in the first place), but it's not something I'm
going to lose any sleep over.
--
Glenn Maynard
Reply to: