Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Extend Safari's History to a full year' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Extend Safari's History to a full year
Authored by: kholburn on Mar 22, '05 05:12:36PM
I chose a different strategy. The idea is to back up the safari history file each day.

I created a small script ~/sbin/backup.browser.history:

#!/bin/sh

dir="/Users/fred/Library/Safari/"
file="$dir/History.plist"
back="$dir/History/`date '+history-%Y-%m-%d.plist'`"

if [ ! -f "$file" ]; then
  exit
fi

/bin/cp "$file" "$back" 


Then I created a crontab entry using crontab -e
$ crontab -l
SHELL=/bin/sh
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
HOME=/var/log
#
#minute hour    mday    month   wday    who     command
#
5 19 * * * /Users/fred/sbin/backup.browser.history

If you use vim you might need to use the setting :
:set nobackup

to get cronbtab -e to work.



[ Reply to This | # ]