I notice that when opening .bash_history
that it contains only the entries from my previous session, it seems that the current session is appended only on exit. Is there any way to prevent the current session from saving? Even crashing bash
is an option if one knows how to do that. I found that I can kill -9
the process, but if there is a better way I would love to know.
相关问题
- JQ: Select when attribute value exists in a bash a
- bash print whole line after splitting line with if
- “command not found” errors in expect script execut
- grep using grep results
- UNIX Bash - Removing double quotes from specific s
相关文章
- Check if directory exists on remote machine with s
- Reverse four length of letters with sed in unix
- Launch interactive SSH bash session from PHP
- BASH: Basic if then and variable assignment
- Bash script that creates a directory structure
- Test if File/Dir exists over SSH/Sudo in Python/Ba
- How can I create a “tmp” directory with Elastic Be
- Spread 'sed' command over multiple lines
I know this is an old thread. Just wanted to add this for completion:
If you just want specific commands not to be saved check if
HISTCONTROL
variable is set:HISTCONTROL=ignoreboth
orHISTCONTROL=ignorespace
Every command that starts with a leading space will not be put in the history.
Just my 2 cents.