clear command history in tcsh
How do you clear your command history? I don't mean the history you get when you run
Code:
history Code:
history -c I noticed a file in my home directory ~/.history It contained the history of my commands. I tried deleting the file, but when I logout and log back in, the .history file is recreated with all the history still there. I guess it must store it in memory. So how do you go about clearing the command history? btw, I'm using tcsh |
I have bash.I do as follows BUT there is tip for you at end to locate corresponding file.
Code:
Edit your file ~/.bashrc Try Code:
find ~ -type f -exec grep -l -i histappend '{}' ';' if you find this post useful than thank me by pressing thumbs up button.Thank You. |
Sorry, but I'm not running bash, so shopt is not an available command and would not affect tcsh.
I actually found out how to do it from reading http://forums11.itrc.hp.com/service/...hreadId=957353 basically, i did: Code:
set history=0 |
can you show output of this command
Code:
find ~ -type f -exec grep -l -i histappend '{}' ';' |
hi sumeet. I ran the command, but there was no output.
EDIT: and i understand what the command does; do a grep on all files for the substring histappend and print the file if it contains that string. ignore case. |
Another things to note in my code was
-l --stop search in file when you find first match & also instead of mentioning the whole line just give file name. Actually first I had tried grep -ir 'histappend' * but I think in this case files with . at beginning are excluded so I had to go for -exec option in 'find' command. Looks like you also know a lot about commands. Pleased to meet you. |
All times are GMT -5. The time now is 07:17 AM. |