Help with history command

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Help with history command

Rinkkzy
Hello..!
I just want to know..how to get back all command history after performing history -c command ?
Please help me..
Reply | Threaded
Open this post in threaded view
|

Re: Help with history command

Guru
Administrator
Once you issue history -c, your history is cleared. You cannot get it back unless you have taken the back-up of the history file before clearing.

Reply | Threaded
Open this post in threaded view
|

Re: Help with history command

Rinkkzy
ok...but someone has told me that this is possible.
So..please try to find out if possible..
Thank you..:)
Reply | Threaded
Open this post in threaded view
|

Re: Help with history command

Guru
Administrator
If your shell is bash, check in the file .bash_history present in the home directory. If not, check whatever file the env variable HISTFILE is pointing to.
Reply | Threaded
Open this post in threaded view
|

Re: Help with history command

Rinkkzy
Ok...I got the solution.
Thank you...:)
Reply | Threaded
Open this post in threaded view
|

Re: Help with history command

Guru
Administrator
If you do not mind, please share your solution. It will help many .
Reply | Threaded
Open this post in threaded view
|

Re: Help with history command

Rinkkzy
I meant , the above reply is my solution.
I haven't get any else...still
And i will post it for sure..if i'll get