Is there a way to scroll back in terminal to a specific command?

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








up vote
1
down vote

favorite












I have a terminal command which gives me very long output and I want to check this output from the very first line of it. So far I have to scroll with the mouse and try to catch it, which is quite annoying (especially if I executed this command few times). Is there a way to scroll the output to, say, last executed command?










share|improve this question

























    up vote
    1
    down vote

    favorite












    I have a terminal command which gives me very long output and I want to check this output from the very first line of it. So far I have to scroll with the mouse and try to catch it, which is quite annoying (especially if I executed this command few times). Is there a way to scroll the output to, say, last executed command?










    share|improve this question























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I have a terminal command which gives me very long output and I want to check this output from the very first line of it. So far I have to scroll with the mouse and try to catch it, which is quite annoying (especially if I executed this command few times). Is there a way to scroll the output to, say, last executed command?










      share|improve this question













      I have a terminal command which gives me very long output and I want to check this output from the very first line of it. So far I have to scroll with the mouse and try to catch it, which is quite annoying (especially if I executed this command few times). Is there a way to scroll the output to, say, last executed command?







      command-line scrolling






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 9 at 14:10









      wasd

      1921215




      1921215




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote



          accepted










          You can pipe the output of said program to a pager program or a file that you can scroll through at your leisure.



          To the less pager: the-program --args 2>&1 |less



          To a file: the-program --args 2>&1 >> output.log






          share|improve this answer




















          • what does 2>&1 stands for?
            – wasd
            Mar 9 at 15:06










          • It pipes stderr to stdout so that any error messages generated by the program will show up in the pager or output file.
            – dsstorefile1
            Mar 10 at 8:48










          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "89"
          ;
          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: true,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          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%2faskubuntu.com%2fquestions%2f1013411%2fis-there-a-way-to-scroll-back-in-terminal-to-a-specific-command%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
          1
          down vote



          accepted










          You can pipe the output of said program to a pager program or a file that you can scroll through at your leisure.



          To the less pager: the-program --args 2>&1 |less



          To a file: the-program --args 2>&1 >> output.log






          share|improve this answer




















          • what does 2>&1 stands for?
            – wasd
            Mar 9 at 15:06










          • It pipes stderr to stdout so that any error messages generated by the program will show up in the pager or output file.
            – dsstorefile1
            Mar 10 at 8:48














          up vote
          1
          down vote



          accepted










          You can pipe the output of said program to a pager program or a file that you can scroll through at your leisure.



          To the less pager: the-program --args 2>&1 |less



          To a file: the-program --args 2>&1 >> output.log






          share|improve this answer




















          • what does 2>&1 stands for?
            – wasd
            Mar 9 at 15:06










          • It pipes stderr to stdout so that any error messages generated by the program will show up in the pager or output file.
            – dsstorefile1
            Mar 10 at 8:48












          up vote
          1
          down vote



          accepted







          up vote
          1
          down vote



          accepted






          You can pipe the output of said program to a pager program or a file that you can scroll through at your leisure.



          To the less pager: the-program --args 2>&1 |less



          To a file: the-program --args 2>&1 >> output.log






          share|improve this answer












          You can pipe the output of said program to a pager program or a file that you can scroll through at your leisure.



          To the less pager: the-program --args 2>&1 |less



          To a file: the-program --args 2>&1 >> output.log







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 9 at 14:28









          dsstorefile1

          1,312111




          1,312111











          • what does 2>&1 stands for?
            – wasd
            Mar 9 at 15:06










          • It pipes stderr to stdout so that any error messages generated by the program will show up in the pager or output file.
            – dsstorefile1
            Mar 10 at 8:48
















          • what does 2>&1 stands for?
            – wasd
            Mar 9 at 15:06










          • It pipes stderr to stdout so that any error messages generated by the program will show up in the pager or output file.
            – dsstorefile1
            Mar 10 at 8:48















          what does 2>&1 stands for?
          – wasd
          Mar 9 at 15:06




          what does 2>&1 stands for?
          – wasd
          Mar 9 at 15:06












          It pipes stderr to stdout so that any error messages generated by the program will show up in the pager or output file.
          – dsstorefile1
          Mar 10 at 8:48




          It pipes stderr to stdout so that any error messages generated by the program will show up in the pager or output file.
          – dsstorefile1
          Mar 10 at 8:48

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1013411%2fis-there-a-way-to-scroll-back-in-terminal-to-a-specific-command%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          pylint3 and pip3 broken

          Missing snmpget and snmpwalk

          How to enroll fingerprints to Ubuntu 17.10 with VFS491