Hello,
I need the procedure for deleting the perticular shell command from the "history" command.I want to protect other user so that they can't know which comands was run on shell.
thank you.
Hello,
I need the procedure for deleting the perticular shell command from the "history" command.I want to protect other user so that they can't know which comands was run on shell.
thank you.
Aress 24x7 Support
I dunno the exact way for deleting a particular command from history but if you want to CLEAR all the commands from HISTORY then use :Originally posted by aress24x7
Hello,
I need the procedure for deleting the perticular shell command from the "history" command.I want to protect other user so that they can't know which comands was run on shell.
thank you.
clear history
Hope this helps !
rh_linuxion
It is very simple to be Happy but it is very difficult to be Simple.
Yeah here is how you can achieve that :Originally posted by vishal
I dunno the exact way for deleting a particular command from history but if you want to CLEAR all the commands from HISTORY then use :
clear history
Hope this helps !
history -d <line number>
that line will get deleted from the history
man is your friend![]()
rh_linuxion
It is very simple to be Happy but it is very difficult to be Simple.
i think history's commands are store in .bash_history in ROOT.If we delete from that then .........
But still it doesn't work.
Have you any answer!!!!!!!!!
Aress 24x7 Support
Yes they are stored in .bash_history and if you delete them from the file but obvious it 's not going to affect your current history coz those are stored in the Env Variable.Originally posted by aress24x7
i think history's commands are store in .bash_history in ROOT.If we delete from that then .........
But still it doesn't work.
Have you any answer!!!!!!!!!
Have tried :
# history -d <line number>
This should work !![]()
rh_linuxion
It is very simple to be Happy but it is very difficult to be Simple.
Yes,I tried it but still i get the problem.
I think there are some procedure and then delete that perticular command from the .bash_history.
Thank you in advance.
Best regards,
Your Friend.
Aress 24x7 Support
Are you looking for roots .bash_history or the users one? The users one is in /home/username/.bash_history.