[ Usenet FAQs | Search | Web FAQs | Documents | RFC Index ]
    Search the FAQ Archives

Single Page

Top Document: C News Frequently Asked Questions (FAQs)
Previous Document: Mkhistory runs for a really long time.
Next Document: How can I get C News to update the third field of the active file?


How can I clean up unused subdirectories in my news spool?


Someone (sorry I've lost the attribution) asked:
We've got a bunch of directories in our news spool for groups that no
longer (or never?) existed, like /news/alt/music/pop/will/eat/itself.
These may be either the result of groups being rmgrouped, or maybe groups
that were added in C news with the "x" flag.  Is there any quick and dirty
way of cleaning out these directories without doing it by hand?

Tom Limoncelli replied:
C News and INN operate as follows:

Deleting a group just removes the line from the active file.  The articles
are still listed in the history file, and should expire as they normally
would have.  (Though, INN's expire will warn you that it is expiring articles
from a group that no longer exists).  When all the articles are gone, the
directory will remain there, empty.  An empty directory takes up minimal space.

Now and then someone posts a script to delete empty directories.  The
challenge is to do a "find -depth" so the subdirectories get deleted
before the parents are checked for emptiness.

However, *now* a simple script will not work, due to the existence
of .threads and .nnx .nnd and (whatever tin creates) files.

"find /var/spool/news/. -type f -mtime +30 -print | xargs rm" will
certainly zap things, but might also delete any archives or other files
you store on that disk.

Rich Salz added:
INN never removes a spool directory automatically.
Change the "rmgroup" script to remove any index files after it does the
ctlinnd rmgroup command and the various "simple scripts" will work.



Top Document: C News Frequently Asked Questions (FAQs)
Previous Document: Mkhistory runs for a really long time.
Next Document: How can I get C News to update the third field of the active file?

Single Page


[ Usenet FAQs | Search | Web FAQs | Documents | RFC Index ]

Send corrections/additions to the FAQ Maintainer:
linimon@nominil.lonesome.com

Last Update October 11 2008 @ 00:15 AM

© 2008 FAQS.ORG. All rights reserved.