How to kill history from terminal to others using same id

I have a application ID and many users in the team are using this id. I dont want the people to check whati am running with the id from my terminal. is there a way to kill history get back from my console to everybody so thatwhat ever i type in my console cant be seen from other users who are trying to see history. But i should be able to see it.

Please let me know.

You could put something like this in your ".profile" or 1 of the other login files depending on your shell.

HISTFILE=${HOME}/.history.`tty | sed -e "s%/%%g"`

That way each session has its own history file.

However, if you log off and someone else logs in, and gets the "tty" you previously had, this person can still see your command history.

But then, why shouldn't others be allowed to see which commands you used if you are doing only valid things?

I cant edit the .profile as every body uses this bacuase of the same id we all use. The reason I want this is there are people in the team who constantly try to see what others are doing. I am seeing for something i can do from my terminal with out editing any profiles to kill histiry coming out from my terminal? is it possible?

If you edit the .profile as I mentioned, everybody will maintain the same functionality, each session will only use a different history file.

another option would be to enter on your command line:

HISTSIZE=0
export HISTSIZE

However, then you completely loose the history functionality

can i increase the size of the history file. only 10 latest commands are being stored. If everybody has there own history file then how come i am able to see what others are typing?

The size of the history file is not in lines but in characters.

Lets assume your average command is about 25 characters then a HISTSIZE of 250 would more or less store 10 commands.

In case you make the change in the .profile as mentioned before, the name of the history file you are using is related to the "tty" you are working on.

Since everybody has a different "tty" the commands of each person are stored in a different file and you cant see the commands of others.

However, when you log off, your "tty" is released. The next person who logs on could get the same "tty" assigned as you were using before. If this is the case then only that person will be able to see your command history.

Unless ofcourse you make sure your private history file is deleted when you log off.