[Pidgin] #1738: Truncate Conversation Log
Pidgin
trac at pidgin.im
Sat Jul 21 05:15:36 EDT 2007
#1738: Truncate Conversation Log
---------------------------+------------------------------------------------
Reporter: bperetto | Owner:
Type: enhancement | Status: new
Priority: minor | Milestone:
Component: pidgin (gtk) | Version: 2.0.2
Resolution: | Keywords: log size truncate
Pending: 0 |
---------------------------+------------------------------------------------
Comment (by jkohen):
On *NIX you can use the following script (at your own risk) to achive
that:
{{{/usr/bin/find $HOME/.purple/logs/ -mindepth 4 -used +90 -execdir rm {}
\+}}}
It will delete all the log files that haven't been "used" (see find's
manual for an explanation) in 90 days. It will never delete directories.
Alternatively you could use the following script to delete directories for
which no files has been "used" in at least 90 days. In other words, any
directory containing at least one recently used file will be left
untouched.
{{{/usr/bin/find $HOME/.purple/logs/ -mindepth 3 -used +90 -type d
-execdir echo rm -r {} \+}}}
Or you can use both one after the other, to get both effects combined. For
instance, purge all logs for people you haven't talked in three months and
delete all logs older than one year, which is exactly what I'm setting up
now.
Note: if your find implementation doesn't support -execdir, then use -exec
instead.
--
Ticket URL: <http://developer.pidgin.im/ticket/1738#comment:1>
Pidgin <http://pidgin.im>
Pidgin
More information about the Tracker
mailing list