LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Blogs > crajor
User Name
Password

Notices


Rate this Entry

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.
Posted in Uncategorized
Views 273 Comments 1
« Prev     Main     Next »
Total Comments 1

Comments

  1. Old Comment
    Cool. Makes me ponder a script for the future, something along the lines of:

    Code:
    #!/bin/bash
    iptables $*
    ip6tables $*
    Call it optables_both.sh or something, lol, and have it do both 6 and regular at once. Untested, obviously.
    Posted 03-15-2021 at 04:59 PM by jr_bob_dobbs jr_bob_dobbs is offline
 

  



All times are GMT -5. The time now is 10:42 PM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration