How to Stop Commands from Appearing in Bash History

I like learning new stuff - anything, including technology. I love tinkering with new tools, systems and services, especially open source projects
Search for a command to run...

I like learning new stuff - anything, including technology. I love tinkering with new tools, systems and services, especially open source projects
No comments yet. Be the first to comment.
inodes is a concept in Linux. Oh waitβ¦no Fun fact that I learned while experimenting on my macOS - I can see that the term and concept of inodes exists in the context of macOS too Looks like itβs a βUnixβ thing and Linux and Darwin, both are Unix bas...

You can look for Kubernetes Preemption Events in your observability system assuming you are exporting your Kubernetes Events to some store like some time series DB or similar In our case, we use Prometheus and we have an exporter for exporting the Ku...

Recently, when I discovered the py-spy profiler took for Python, I also discovered Speedscope, which is visualization tool for visualizing performance data (performance profile etc). This is a flamegraph Visualization. I have something of this sort w...

So, today, we had an issue in one of our internal systems called API Tester. It was very slow. Only today it was slow, and the CPU usage was very high according to our monitoring systems, especially since today morning. Before noticing the CPU usage,...

If you have Prometheus running and scraping metrics - You can find Kubernetes list of features enabled information for every feature using kubernetes_feature_enabled metric which gives build information kubernetes_feature_enabled{} The name of the f...

I usually don't want my secrets to show up in my bash history in the $HOME/.bash_history file. Long ago, folks told me that using a trailing space will solve this issue, but it didn't. Apparently, there's some extra stuff to do
Just do
HISTCONTROL=ignoreboth
The above also helps with getting rid of duplicate commands from the bash history, which is pretty cool πππ since I use fzf https://github.com/junegunn/fzf to search through my history and choose commands, and when I search through a command with some strings, sometimes same result shows up multiple times - so many times that it's crazy and I just wish it just showed one unique result and get rid of duplicates, now this is possible because fzf looks at my $HOME/.bash_history only to look at all my past commands and if the bash history file contains unique commands, all is good, right? ;) By the way, I use fzf as part of my Ctrl + r keybinding for reverse search over all commands.
fzf has so many ideas for keybindings themselves - https://github.com/junegunn/fzf?tab=readme-ov-file#key-bindings-for-command-line , apart from community's ideas π‘π