Timestamp with search result

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I know that I can search history with CtrlR. Also I can
see timestamps like this:



HISTTIMEFORMAT='%x %r '


then running the "history" command. However I would like to combine the two. I
would like to search using one of these or similar:




  • CtrlR

  • history

  • fc

  • grep

  • less

but the result(s) should have the timestamp prepended. Is such a thing possible?







share|improve this question
























    up vote
    0
    down vote

    favorite












    I know that I can search history with CtrlR. Also I can
    see timestamps like this:



    HISTTIMEFORMAT='%x %r '


    then running the "history" command. However I would like to combine the two. I
    would like to search using one of these or similar:




    • CtrlR

    • history

    • fc

    • grep

    • less

    but the result(s) should have the timestamp prepended. Is such a thing possible?







    share|improve this question






















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I know that I can search history with CtrlR. Also I can
      see timestamps like this:



      HISTTIMEFORMAT='%x %r '


      then running the "history" command. However I would like to combine the two. I
      would like to search using one of these or similar:




      • CtrlR

      • history

      • fc

      • grep

      • less

      but the result(s) should have the timestamp prepended. Is such a thing possible?







      share|improve this question












      I know that I can search history with CtrlR. Also I can
      see timestamps like this:



      HISTTIMEFORMAT='%x %r '


      then running the "history" command. However I would like to combine the two. I
      would like to search using one of these or similar:




      • CtrlR

      • history

      • fc

      • grep

      • less

      but the result(s) should have the timestamp prepended. Is such a thing possible?









      share|improve this question











      share|improve this question




      share|improve this question










      asked Dec 23 '17 at 18:50









      Steven Penny

      2,30821635




      2,30821635




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote



          accepted










          This seems to work:



          history | grep pattern


          I also added this to my "~/.profile":



          alias ahist='history | grep -i --color'
          HISTIGNORE='ahist *'





          share|improve this answer






















            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "106"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );








             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f412709%2ftimestamp-with-search-result%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            0
            down vote



            accepted










            This seems to work:



            history | grep pattern


            I also added this to my "~/.profile":



            alias ahist='history | grep -i --color'
            HISTIGNORE='ahist *'





            share|improve this answer


























              up vote
              0
              down vote



              accepted










              This seems to work:



              history | grep pattern


              I also added this to my "~/.profile":



              alias ahist='history | grep -i --color'
              HISTIGNORE='ahist *'





              share|improve this answer
























                up vote
                0
                down vote



                accepted







                up vote
                0
                down vote



                accepted






                This seems to work:



                history | grep pattern


                I also added this to my "~/.profile":



                alias ahist='history | grep -i --color'
                HISTIGNORE='ahist *'





                share|improve this answer














                This seems to work:



                history | grep pattern


                I also added this to my "~/.profile":



                alias ahist='history | grep -i --color'
                HISTIGNORE='ahist *'






                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Dec 27 '17 at 2:26

























                answered Dec 26 '17 at 16:35









                Steven Penny

                2,30821635




                2,30821635






















                     

                    draft saved


                    draft discarded


























                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f412709%2ftimestamp-with-search-result%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    How to check contact read email or not when send email to Individual?

                    Displaying single band from multi-band raster using QGIS

                    How many registers does an x86_64 CPU actually have?