Scroll through command output without a temporary file











up vote
2
down vote

favorite












I am wandering if there is a way to read the full output of a command when it uses more than the screen. I am currently having to output the command into a file, and then using nano to scroll through it.



E.g. $ ls -Al /etc/ only displays the end of the output and cuts of the rest.










share|improve this question




























    up vote
    2
    down vote

    favorite












    I am wandering if there is a way to read the full output of a command when it uses more than the screen. I am currently having to output the command into a file, and then using nano to scroll through it.



    E.g. $ ls -Al /etc/ only displays the end of the output and cuts of the rest.










    share|improve this question


























      up vote
      2
      down vote

      favorite









      up vote
      2
      down vote

      favorite











      I am wandering if there is a way to read the full output of a command when it uses more than the screen. I am currently having to output the command into a file, and then using nano to scroll through it.



      E.g. $ ls -Al /etc/ only displays the end of the output and cuts of the rest.










      share|improve this question















      I am wandering if there is a way to read the full output of a command when it uses more than the screen. I am currently having to output the command into a file, and then using nano to scroll through it.



      E.g. $ ls -Al /etc/ only displays the end of the output and cuts of the rest.







      command-line






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 24 at 20:12









      Rui F Ribeiro

      38.3k1476127




      38.3k1476127










      asked Oct 6 '15 at 20:22









      Krii

      18011




      18011






















          3 Answers
          3






          active

          oldest

          votes

















          up vote
          4
          down vote



          accepted










          You need to use less less is a pager, it allows you to view a page at a time. e.g.



          command | less
          ls -Al /etc | less


          The most common command while in less are:





          • enter advance one line


          • space advance one page


          • q quit / exit help


          • h help


          see man less for more info, like how to search.






          share|improve this answer






























            up vote
            1
            down vote













            That's possible by pressing shift + pg up.



            More information on scrollback and the scrollback buffer can be found here.






            share|improve this answer























            • This will depend on the terminal (emulator).
              – ctrl-alt-delor
              Oct 6 '15 at 20:32










            • It works for me.
              – Krii
              Oct 6 '15 at 20:33










            • @richard Which one(s) don't implement a scrollback buffer?
              – Jan
              Oct 6 '15 at 20:33








            • 1




              @Jan I can not list them all, but some examples are the console alt ctrl F1, old or low resource using emulators, and some physical terminals.
              – ctrl-alt-delor
              Oct 6 '15 at 20:41








            • 1




              @richard, the linux console does have a scrollback buffer, it just only works for the current vt, and is lost on vt switch.
              – hildred
              Oct 7 '15 at 2:59


















            up vote
            0
            down vote













            Pipe any command's output into less and it will allow pagination, searching nd whatnot.



            ls -lA /etc | less



            As 'less' is displaying your text, hit h for help, read and ponder.
            man less - more to read.






            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: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: null,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              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%2f234356%2fscroll-through-command-output-without-a-temporary-file%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              3 Answers
              3






              active

              oldest

              votes








              3 Answers
              3






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes








              up vote
              4
              down vote



              accepted










              You need to use less less is a pager, it allows you to view a page at a time. e.g.



              command | less
              ls -Al /etc | less


              The most common command while in less are:





              • enter advance one line


              • space advance one page


              • q quit / exit help


              • h help


              see man less for more info, like how to search.






              share|improve this answer



























                up vote
                4
                down vote



                accepted










                You need to use less less is a pager, it allows you to view a page at a time. e.g.



                command | less
                ls -Al /etc | less


                The most common command while in less are:





                • enter advance one line


                • space advance one page


                • q quit / exit help


                • h help


                see man less for more info, like how to search.






                share|improve this answer

























                  up vote
                  4
                  down vote



                  accepted







                  up vote
                  4
                  down vote



                  accepted






                  You need to use less less is a pager, it allows you to view a page at a time. e.g.



                  command | less
                  ls -Al /etc | less


                  The most common command while in less are:





                  • enter advance one line


                  • space advance one page


                  • q quit / exit help


                  • h help


                  see man less for more info, like how to search.






                  share|improve this answer














                  You need to use less less is a pager, it allows you to view a page at a time. e.g.



                  command | less
                  ls -Al /etc | less


                  The most common command while in less are:





                  • enter advance one line


                  • space advance one page


                  • q quit / exit help


                  • h help


                  see man less for more info, like how to search.







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Oct 6 '15 at 20:35

























                  answered Oct 6 '15 at 20:31









                  ctrl-alt-delor

                  10.2k41955




                  10.2k41955
























                      up vote
                      1
                      down vote













                      That's possible by pressing shift + pg up.



                      More information on scrollback and the scrollback buffer can be found here.






                      share|improve this answer























                      • This will depend on the terminal (emulator).
                        – ctrl-alt-delor
                        Oct 6 '15 at 20:32










                      • It works for me.
                        – Krii
                        Oct 6 '15 at 20:33










                      • @richard Which one(s) don't implement a scrollback buffer?
                        – Jan
                        Oct 6 '15 at 20:33








                      • 1




                        @Jan I can not list them all, but some examples are the console alt ctrl F1, old or low resource using emulators, and some physical terminals.
                        – ctrl-alt-delor
                        Oct 6 '15 at 20:41








                      • 1




                        @richard, the linux console does have a scrollback buffer, it just only works for the current vt, and is lost on vt switch.
                        – hildred
                        Oct 7 '15 at 2:59















                      up vote
                      1
                      down vote













                      That's possible by pressing shift + pg up.



                      More information on scrollback and the scrollback buffer can be found here.






                      share|improve this answer























                      • This will depend on the terminal (emulator).
                        – ctrl-alt-delor
                        Oct 6 '15 at 20:32










                      • It works for me.
                        – Krii
                        Oct 6 '15 at 20:33










                      • @richard Which one(s) don't implement a scrollback buffer?
                        – Jan
                        Oct 6 '15 at 20:33








                      • 1




                        @Jan I can not list them all, but some examples are the console alt ctrl F1, old or low resource using emulators, and some physical terminals.
                        – ctrl-alt-delor
                        Oct 6 '15 at 20:41








                      • 1




                        @richard, the linux console does have a scrollback buffer, it just only works for the current vt, and is lost on vt switch.
                        – hildred
                        Oct 7 '15 at 2:59













                      up vote
                      1
                      down vote










                      up vote
                      1
                      down vote









                      That's possible by pressing shift + pg up.



                      More information on scrollback and the scrollback buffer can be found here.






                      share|improve this answer














                      That's possible by pressing shift + pg up.



                      More information on scrollback and the scrollback buffer can be found here.







                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited Apr 13 '17 at 12:36









                      Community

                      1




                      1










                      answered Oct 6 '15 at 20:25









                      Jan

                      5,1941827




                      5,1941827












                      • This will depend on the terminal (emulator).
                        – ctrl-alt-delor
                        Oct 6 '15 at 20:32










                      • It works for me.
                        – Krii
                        Oct 6 '15 at 20:33










                      • @richard Which one(s) don't implement a scrollback buffer?
                        – Jan
                        Oct 6 '15 at 20:33








                      • 1




                        @Jan I can not list them all, but some examples are the console alt ctrl F1, old or low resource using emulators, and some physical terminals.
                        – ctrl-alt-delor
                        Oct 6 '15 at 20:41








                      • 1




                        @richard, the linux console does have a scrollback buffer, it just only works for the current vt, and is lost on vt switch.
                        – hildred
                        Oct 7 '15 at 2:59


















                      • This will depend on the terminal (emulator).
                        – ctrl-alt-delor
                        Oct 6 '15 at 20:32










                      • It works for me.
                        – Krii
                        Oct 6 '15 at 20:33










                      • @richard Which one(s) don't implement a scrollback buffer?
                        – Jan
                        Oct 6 '15 at 20:33








                      • 1




                        @Jan I can not list them all, but some examples are the console alt ctrl F1, old or low resource using emulators, and some physical terminals.
                        – ctrl-alt-delor
                        Oct 6 '15 at 20:41








                      • 1




                        @richard, the linux console does have a scrollback buffer, it just only works for the current vt, and is lost on vt switch.
                        – hildred
                        Oct 7 '15 at 2:59
















                      This will depend on the terminal (emulator).
                      – ctrl-alt-delor
                      Oct 6 '15 at 20:32




                      This will depend on the terminal (emulator).
                      – ctrl-alt-delor
                      Oct 6 '15 at 20:32












                      It works for me.
                      – Krii
                      Oct 6 '15 at 20:33




                      It works for me.
                      – Krii
                      Oct 6 '15 at 20:33












                      @richard Which one(s) don't implement a scrollback buffer?
                      – Jan
                      Oct 6 '15 at 20:33






                      @richard Which one(s) don't implement a scrollback buffer?
                      – Jan
                      Oct 6 '15 at 20:33






                      1




                      1




                      @Jan I can not list them all, but some examples are the console alt ctrl F1, old or low resource using emulators, and some physical terminals.
                      – ctrl-alt-delor
                      Oct 6 '15 at 20:41






                      @Jan I can not list them all, but some examples are the console alt ctrl F1, old or low resource using emulators, and some physical terminals.
                      – ctrl-alt-delor
                      Oct 6 '15 at 20:41






                      1




                      1




                      @richard, the linux console does have a scrollback buffer, it just only works for the current vt, and is lost on vt switch.
                      – hildred
                      Oct 7 '15 at 2:59




                      @richard, the linux console does have a scrollback buffer, it just only works for the current vt, and is lost on vt switch.
                      – hildred
                      Oct 7 '15 at 2:59










                      up vote
                      0
                      down vote













                      Pipe any command's output into less and it will allow pagination, searching nd whatnot.



                      ls -lA /etc | less



                      As 'less' is displaying your text, hit h for help, read and ponder.
                      man less - more to read.






                      share|improve this answer

























                        up vote
                        0
                        down vote













                        Pipe any command's output into less and it will allow pagination, searching nd whatnot.



                        ls -lA /etc | less



                        As 'less' is displaying your text, hit h for help, read and ponder.
                        man less - more to read.






                        share|improve this answer























                          up vote
                          0
                          down vote










                          up vote
                          0
                          down vote









                          Pipe any command's output into less and it will allow pagination, searching nd whatnot.



                          ls -lA /etc | less



                          As 'less' is displaying your text, hit h for help, read and ponder.
                          man less - more to read.






                          share|improve this answer












                          Pipe any command's output into less and it will allow pagination, searching nd whatnot.



                          ls -lA /etc | less



                          As 'less' is displaying your text, hit h for help, read and ponder.
                          man less - more to read.







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Oct 6 '15 at 20:32









                          Hannu

                          33916




                          33916






























                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Unix & Linux Stack Exchange!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.





                              Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                              Please pay close attention to the following guidance:


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f234356%2fscroll-through-command-output-without-a-temporary-file%23new-answer', 'question_page');
                              }
                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              Morgemoulin

                              Scott Moir

                              Souastre