Code: Select all
#!/bin/bash
# repeat this cycle every 30 minutes
# although firefox only creates a file once a day
while true; do
# copy bookmarkbackups folder from firefox profile
# it will backup from every profile
# to /home/vicky/Documents/bookmarkbackups firefox
rsync -amv --include "*/" --include "bookmarkbackups/*" --exclude "*" '/home/vicky/.mozilla/firefox/' '/home/vicky/Documents/bookmarkbackups firefox/'
# delete backup files older than 30 days
find '/home/vicky/Documents/bookmarkbackups firefox/' -type f -mtime +30 -exec rm -rf {} \;
sleep 30m; done
clean SpiderOak
Code: Select all
#!/bin/bash
# notification feedback that it is starting the process
notify-send " Deleting SpiderOak history... " -t 6000
# closes spideroak for you
killall SpiderOak
sleep 5
# clears all historical versions of files
# man spideroak for historical versions alternative options
/usr/bin/SpiderOak --purge-historical-versions all
# empty the garbage bin in your spideroak account
# of files you deleted on the computer, but spideroak keeps
/usr/bin/SpiderOak --empty-garbage-bin
# open spideroak
nohup /usr/bin/SpiderOak &
sleep 5
# notification feedback that it has completed the task
notify-send " History cleared " -t 6000
sleep 5
exit 0