ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Linux: History

    IT Discussion
    linux xubuntu fedora linux mint centos history
    4
    6
    1.1k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • gjacobseG
      gjacobse
      last edited by

      In trying to isolate why an install worked on one system and not on another, I need only review history It's a great resource unless you have a habit of covering your 'tracks' by running history -c - which clears it.

      So - how do you quickly and easily look at it as a text file? simple... nearly always find it via GOOGLE, but why not tag it here.

      history >> /home/%user/Desktop/history.txt
      

      This exports it to a text file on your desktop.. history saved,.. just store it of PC and you can do more trouble shooting if needed.

      Hope it helps someone other than myself.

      1 Reply Last reply Reply Quote 3
      • stacksofplatesS
        stacksofplates
        last edited by

        you can just do

        gedit ~/.bash_history
        

        or if you like the cli

        cat ~/.bash_history
        

        Obv only Bash if that's what you're using.

        dbeatoD F 2 Replies Last reply Reply Quote 5
        • stacksofplatesS
          stacksofplates
          last edited by

          Another tip. Instead of needing to clear your history you can enable a space to hide that command. This way you can use environment variables for credentials instead of storing in files or being tracked in your history. Just enable it with

          export HISTCONTROL=ignorespace
          

          in your ~/.bashrc.

          Then just add a space before the command and it's hidden from your history.

          1 Reply Last reply Reply Quote 3
          • dbeatoD
            dbeato @stacksofplates
            last edited by

            @stacksofplates said in Linux: History:

            you can just do

            gedit ~/.bash_history
            

            or if you like the cli

            cat ~/.bash_history
            

            Obv only Bash if that's what you're using.

            That’s what I do

            1 Reply Last reply Reply Quote 0
            • F
              Francesco Provino @stacksofplates
              last edited by

              @stacksofplates said in Linux: History:

              you can just do

              gedit ~/.bash_history
              

              or if you like the cli

              cat ~/.bash_history
              

              Obv only Bash if that's what you're using.

              Why conCATenate? Just use LESS.

              stacksofplatesS 1 Reply Last reply Reply Quote 0
              • stacksofplatesS
                stacksofplates @Francesco Provino
                last edited by

                @francesco-provino said in Linux: History:

                @stacksofplates said in Linux: History:

                you can just do

                gedit ~/.bash_history
                

                or if you like the cli

                cat ~/.bash_history
                

                Obv only Bash if that's what you're using.

                Why conCATenate? Just use LESS.

                You can do either or any combination. Mostly just pointing you you don't need the gui.

                1 Reply Last reply Reply Quote 1
                • 1 / 1
                • First post
                  Last post