Clarification: Am not looking to destroy
history, am looking for means to periodically purge it via
launchdfor security purposes
Have been using
cat /dev/null > ~/.bash_history to clear bash history as have seen in many *nix conversations as the most effective way to do so.
So I put it into a shell script that runs in
launchd, yet after some time I've come to realize though it runs it's not clearing history.
Is it possible to clear bash history this way via bash script or can it only be done manually as a user? Perhaps I need to run the command directly in the .plist and not via a bash script?
Note: I have other scripts running correctly via launchd so question is strictly about being able to clear history via an agent
Update: Found this cool site that helps generate
launchdscripts if this helps anyone. Cannot vouch for it but it's much easier than hacking XML. It seems to use
sh -cfor all commands though, so not sure why that is.
launchd plist generator http://launched.zerowidth.com/