Trac: Emptying a Wiki Database
A quick bit of shell magic to empty a Trac wiki database in a freshly installed Trac environment.
In this example /var/www/html/trac
is assumed to be the Trac environment you created with trac-admin
.
$ for page in `trac-admin /var/www/html/trac wiki list | cut -d' ' -f1 | grep "^[A-Z]" | grep -v "Title"`; do trac-admin /var/www/html/trac wiki remove $page; done;
;)
Related Posts
Using sshdfilter to Secure an SSH Server
Protect your SSH server from brute force attacks and port scans with sshdfilter, an iptables-based security tool that blocks threats in real-time
February 13, 2006 • 1 min read
Fixing the Heartbleed vulnerability on CentOS
Quick and easy fix for the Heartbleed OpenSSL vulnerability on CentOS systems using yum update and service restart commands.
April 10, 2014 • 1 min read
Installing CentOS packages on Red Hat Enterprise Linux
Stuck with RHEL without RHN registration? Learn how to use CentOS repositories as a workaround to install missing packages like Pidgin.
July 23, 2012 • 4 min read