I am using the Terminal app on OS X to try and clear my command history. The entries within my
$HOME/.bash_history file do not match what is returned by the
history command. The
echo $0 command tells me that my Terminal session is using the bash shell (
-bash) so I would expect these to be the same.
history -c command only clears the history that I see in the Terminal app with the
history command, it doesn't affect the contents of the
$HOME/.bash_history file. Please could someone help to explain my misunderstanding?