how to clear history in ksh?

I want to clear the history so that no one should be able to see what commands I gave in the AIX OS level. I tried using history -c , ~/.sh_history, but they aren't working :wall:

Please tell me the command in ksh which can clear all the previous history?

In what way are they 'not working'?

Keep in mind the history file is generally updated when your shell closes and not before.

How to close the shell?

## Why make things difficult? This may be inelegant, but it works very well ...

rm -f .sh_history
touch .sh_history
chmod 600 .sh_history

## You can also edit the history file:

vi .sh_history

Q:
Are you root?
If so why worry no one else can see except you or users with root privileges...

If not, only root can read your history except you... what have you to hide from root then?

.
That said, if its what you want:

> .sh_history

will do the trick...