I think it's not a good idea to scribble in system files directly. Let's do this job by Safari by automated action:
# clear cache and history of safari
# LB 10'2016 Ver 05
set SafariQuit to false # say to Safari good bye if we want
tell application "Safari" to activate # a good way to start safari without cookies
tell application "System Events" to tell process "Safari"
set frontmost to true
click (menu item "Verlauf löschen …" of menu 1 of menu bar item "Verlauf" of menu bar 1)
if exists sheet 1 of front window then # check, if safari is runnung without of window
click button "Verlauf löschen" of sheet 1 of front window
click button "Verlauf löschen" of front window
set SafariQuit to true # safari is running without window and also not used actually
if SafariQuit then
tell application "Safari"
# accessibility Inspector.app (Xcode)
Make'n App from this, add a nice "Safari in Waste".icns, put it in the dock and have fun. Don't forget to give this new App the rights to act in