Jul 01, '09 07:30:00AM • Contributed by: Anonymous
#!/bin/bash
# Point this at your user folder.
useroot=/Users/your_user
# Clear Safari History (except for bookmarks).
rm -f $useroot/Library/Safari/Downloads.plist $useroot/Library/Safari/History.plist
rm -f $useroot/Library/Safari/HistoryIndex.sk $useroot/Library/Safari/TopSites.plist
rm -f $useroot/Library/Safari/WebpageIcons.db $useroot/Library/Safari/LastSession.plist
# Add any additional clean-up here.sudo defaults write com.apple.loginwindow LogoutHook "/Users/your_user/scripts/privacy.sh"
To be complete, you should also visit Safari's Preferences, open the AutoFill tab, and clear all of the checkmarks (Safari then won't remember passwords and forms).
[robg adds: I haven't tested this one.]
