Script To Speed Up Thunderbird By Reseting Its' Index Files

Over time Thunderbird index files can get corrupted &/or bloated. This will slow TB down &/or create errors. I wrote the following script that searches for all existing index files and deletes them. The next time you start up Thunderbird new index files will be generated.
Line 1 finds all index files and lists them one per line in maildat.sh. *NOTE: Don't forget to change /home/dg/.thunderbird/ to /home/<your UN>/.thunderbird/
Lines 2 & 3 insert \ before every space and ' respectively. If you have folders that contain other special charactors needing a leading \ just add them between lines 3 & 4.
Line 4 inserts the proper command into all maildat.sh lines
Line 5 just runs maildat.sh
Line 1 finds all index files and lists them one per line in maildat.sh. *NOTE: Don't forget to change /home/dg/.thunderbird/ to /home/<your UN>/.thunderbird/
Lines 2 & 3 insert \ before every space and ' respectively. If you have folders that contain other special charactors needing a leading \ just add them between lines 3 & 4.
Line 4 inserts the proper command into all maildat.sh lines
Line 5 just runs maildat.sh
- Code: Select all
find /home/dg/.thunderbird/ -name *msf | tee maildat.sh
sed -i 's/\ /\\\ /g' maildat.sh
sed -i "s/'/\\\'/g" maildat.sh
sed -i 's/\/home/rm\ -fv\ \/home/g' maildat.sh
./maildat.sh 2>&1