LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   History Events (https://www.linuxquestions.org/questions/linux-newbie-8/history-events-807077/)

NFox 05-10-2010 09:40 PM

History Events
 
Hello guys :) Glad to join you. Good stuff are running here! To get into the point could anyone help me on deleting some of the history events running on red hat? let's say from 998 cmd to 1000 only? Thanks in adv

bsat 05-11-2010 09:44 AM

found this in the man page of history
Quote:

HIST_ENTRY * remove_history (int which)
Remove history entry at offset which from the history. The removed
element is returned so you can free the line, data, and containing
structure.
I am not sure how exactly can you use it....

colucix 05-11-2010 10:15 AM

Hi and welcome to LinuxQuestions! :)
Code:

history -d 998
you can remove one entry, then better to check numbers again since history is updated accordingly to the deleted entry and to the last command issued. Maybe you have simply to issue the same command above three times.

NFox 05-14-2010 02:22 AM

Hello guys and thanks very much for that :) There is a serious reason to move forward through your help in general.


All times are GMT -5. The time now is 12:45 AM.