LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   removing only most previously executed command from history? (http://www.linuxquestions.org/questions/linux-newbie-8/removing-only-most-previously-executed-command-from-history-279591/)

jagroop mand 01-19-2005 01:14 AM

removing only most previously executed command from history?
 
hello friends,

i am new to this form .
my problem is that i want to delete only the most recently executed command from history without manually editing the file .
for eg. i open .bash_history file with vi command & i delete some previously
executed commands manually . now when i save the changes
& logout , then login again .bash_profile contains entry of "vi .bash_profile"
in it , which i don't want.
so please help me.
ur friend,
mand

leonscape 01-19-2005 04:54 AM

I don't think theres a way of editing the history without it being recorded in the history, but you can exclude things from being inserted into history in the first place. Maybe you could exclude the history command, and edit the history with that. History reference

jagroop mand 01-19-2005 05:39 AM




All times are GMT -5. The time now is 09:33 PM.