There needs to be a way to empty the trash without logging into the server.
That method, as mentioned on
ManagingTopics, is simply too time consuming and unacceptable to many corporate environments.
For the hardcore among you:
#find . -name 'Trash' -exec find {} -name '*,v' \; | xargs rm
--
MartinCleaver - 07 Oct 2003
I attach here a quick-and-dirty script I am using with crontab to empty the Trash all nights. Add a line like the following to your crontab to clean the trash all nights at 3 AM:
0 3 * * * (cd ~twiki/bin ; ./deltrash >/dev/null 2>&1)
NOTE: You must edit the script to suit your installation
--
AndreaSterbini - 07 Oct 2003
It would be nice if the script could use something like
find Trash -mtime +28
To only delete topics that were deleted more than a month ago, but with the actual time limit configurable from a TWiki topic or TWiki.cfg. I'm not sure if you wouldn't need some extra code to handle attachments with different modified dates than their topics though.
--
SamHasler - 10 Oct 2003
Thanks for that Andreas.
For portability, it'd be best as a Perl script. Is this something you could do Sam? I'd help you get it into
CairoRelease if you did the bulk of the coding.
I'd start from the 'mailnotify' script.
--
MartinCleaver - 10 Oct 2003
I intend to bring emptytrash into
DevelopBranch - any objections?
--
MartinCleaver - 22 Nov 2004
Having just tried that sh script I've come to the conclusion that it is dangerous. I no longer intend to bring it into
DevelopBranch.
Anyone got a better script to offer as a base?
--
MartinCleaver - 14 Apr 2005
We may not want to delete the default topics (
WebPreferences etc.). It is possible to write a script that :
- backups the default topics (the MANIFEST file could be used to get their list)
- deletes the Trash web then re-creates it
- copies the backup'd topics to the newly created Trash web
--
BenVoui - 01 May 2006
Sigh. I raised this as a bug/misfeature not so long ago, not realising that this was a longstanding issue. And, as it happens, if you delete all the files from a web, it is no longer recognised as a web. So a simple rm * is a really bad idea.
--
MeredithLesly - 02 May 2006
I see that some are wishing to empty the TWiki Trash like the trash from their Mailbox. But isn't it a very important aspect of the Wiki philosophy to have history available?
I mean, we might not only want to know the history of a still available topic but also of what's been written an discarded before. If you empty the Trash Web you are devalidating your TWiki history in fact.
That being said, of course anybody is free to do it the way it suits him best. There could be support maybe in the tools folder to empty the trash but as people often rather tend to delete then to think it shouldn't be a too obvious feature.
And anyway. I thought a Wiki was something to add content to and not to delete it from.
--
ManfredMislik - 31 Jan 2007
I basically agree; a wiki at the workplace is the corporate memory. Content gets obsolete over time, so a good way to
ManageStaleContent is needed.
Disk space is cheap, a large Trash web is not that much of an issue. Once a year one could move the content of the Trash web to a sub-web, such as Trash.Trash2005, Trash.Trash2006, Trash.Trash2007, etc.
--
PeterThoeny - 01 Feb 2007
Not everyone uses cheap disk space Peter...
It appears that you have no interest in making trash removal accessible to the users. They can create, edit, move, do almost anything with the content but we can't trust anyone to empty the trash?
--
JohnWright - 20 Feb 2007