A bit of info about shell history
Posted 03-15-2021 at 11:40 AM by crajor
Recently I had done an online search and managed to use the info gathered to set up and configure iptables.
However, after finishing that, I discovered that there was also an ip6tables that also needed set up and configured. The question I asked myself was "Am I gonna have to do another internet search for ip6tables, too?"
I spent some time thinking about this, trying to think of how I could find a command list to set up ip6tables. I actually came up with an idea to try - I took a look at the .bash_history to see if I could glean a command list for the iptables work I had done previously. Turns out I found such a list, copied it and saved it as a new text file that I could refer to.
I then went through the process for ip6tables by working this saved command list in its order and replacing the 'iptables' with 'ip6tables' in the commands. Results; Got ip6tables set up and configured as well.
So, to sum up, shell histories are good, useful tools. The nice thing about all of this is not having to rely on my memory (brain) to find that command list, but looking into a commonly used file to get that information.
However, after finishing that, I discovered that there was also an ip6tables that also needed set up and configured. The question I asked myself was "Am I gonna have to do another internet search for ip6tables, too?"
I spent some time thinking about this, trying to think of how I could find a command list to set up ip6tables. I actually came up with an idea to try - I took a look at the .bash_history to see if I could glean a command list for the iptables work I had done previously. Turns out I found such a list, copied it and saved it as a new text file that I could refer to.
I then went through the process for ip6tables by working this saved command list in its order and replacing the 'iptables' with 'ip6tables' in the commands. Results; Got ip6tables set up and configured as well.
So, to sum up, shell histories are good, useful tools. The nice thing about all of this is not having to rely on my memory (brain) to find that command list, but looking into a commonly used file to get that information.
Total Comments 1
Comments
-
Cool. Makes me ponder a script for the future, something along the lines of:
Code:#!/bin/bash iptables $* ip6tables $*
Posted 03-15-2021 at 04:59 PM by jr_bob_dobbs