I started noticing that there were a lot of very large sqlite database files scattered around on my os x installation and testing doing a little sqlite vacuum on them and lo and behold they didn’t appear to be getting regularly vacuumed by the OS at all.. So I created this handy little script to VACUUM those files.
Should be safe to run on your home dir or root “/” folder, but running on your home directory should do wonders for you in terms of disk space and speedup of various applications. The name patterns of which files are sqlite databases is a constant on-going tweek so can’t say for sure this catches all of them. You’ll see a few “not a database or encrypted” errors coming from sqlite which so far seem be safe to ignore from what I can tell.
#!/bin/sh
find . -type f \( -name \*.db -o -name \*.sqlite -o -name \*.sqlite3 -o -name \*.syncdb \
-o -name \*.changedb -o -name \*.synciddb -o -name \*AvailableFeeds\* -o -name \*DefaultCounts\* -o -name \*Envelope\* \) -exec sqlite3 {} VACUUM \;
Latest Entries
- script to vacuum os x sqlite databases
- updated foxylicious extension for Firefox 3
- how to fix butt ugly ubuntu hardy heron fonts
- Where are our java leader’s opinions on closures?
- Tapestry 4.1.5 Released && various Tacos project releases (like Seam / jQuery support)
- painting by numbers, or how html cowards hide behind CSS
- Rails component envy
- OGNL 2.7.2 Released
- news flash – Swing is a terrible API to emulate in web development
- hip hop is neat
Nov 9th, 2009 at 5:39 pm
Good stuff. I thought this blog was dead
You should set up a github repo or something for this. Make it easier to track.
Nov 9th, 2009 at 9:59 pm
Hah, me too. Couldn’t fit the script in a tweet though so had to revert to this old thing..