Hi,
I wrote a alias script and I want to run this script every day at 10 AM. I don't want to mention this alias command in .profile(Since alias commands are nearly 30 to use).
I want to clear the history so that no one should be able to see what commands I gave in the AIX OS level. I tried using history -c , ~/.sh_history, but they aren't working :wall:
Please tell me the command in ksh which can clear all the previous history?
Few tips to use with bash command history.
Erase duplicates in your history file
If you repeat some times the same command, like I usually do when checking memory with
free -m
You will end up with a lot of those command repeated through your command history, and if you type
history
You may see an output like this:
Say I have the following entries in my command history:
less documents/doc1.txt
less documents/doc2.txt
less files/file1.txt
less files/file2.txt
ls
pwd
and that I have the following keyboard binding enabled:
bindkey '^P' history-search-backward
I have noticed that if I then type:
less documents
^P
ZLE brings
less files/files2.txt
as the first option, rather than:
less documents/doc2
I need to delete all commands in my history matching a string.
gsgleason wrote:export HISTSIZE=10000
export HISTFILESIZE=20000
shopt -s histappend
export PROMPT_COMMAND='history -a'I was just updating my bashrc file (thanks to this thread ) and I'm confused.
I want to push the bash history to my github account regularly,say everyday I will push the history to github, how do I do it. Any heads up. Is it possbile?
The bash history file should be renamed to the current data-time. So that I can track. In spite of having a local bash history I prefer to have in github also.
Thanks a lot
I use multiple Konsole terminals. And I want all the commands i type in every terminal to be saved in command history, so that next konsole i open will have all of them.
Alias are a great tool to help increment your productivity on the terminal with bash (or any shell program you’re using), but usually we are too lazy to think at what are the most common, or long commands that we use frequently and prepare an alias for them.
And so someone has done a small piece of software to do this job: aliaser