How to read the output from an interactive program without it scrolling off the screen?

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











up vote
1
down vote

favorite












I am running fdisk on a device and I'm trying to list the supported partition types. The problem is that it immediately scrolls off the screen and I can't see it.



I was using the latest Fedora on someone's Macbook yesterday and fdisk would pause with a : (like the output of less and allow scrolling or q to break from the output.



I am running CentOS 7.5 in text mode from a minimal install on a VGA monitor connected through an HDMI adapter to the system.



Is this a limitation of my terminal, being in text mode (fdisk on the Macbook was run in a terminal on GNOME), the fact that it's an older version of fdisk, or something else entirely?



enter image description here










share|improve this question





















  • doesn't Shift-PageUp work anymore?
    – mosvy
    Nov 30 at 1:58










  • That's a thought - but he's using a MacBook (take a look at the keyboard). If it's recent hardware: no, he doesn't have that key :-)
    – Thomas Dickey
    Nov 30 at 2:07






  • 2




    Oops. But If Fn+Shift+Up doesn't work instead of Shift+PageUp, it's a bug.
    – mosvy
    Nov 30 at 2:18










  • Most terminal emulators have scrollback.
    – D. Ben Knoble
    Nov 30 at 4:15














up vote
1
down vote

favorite












I am running fdisk on a device and I'm trying to list the supported partition types. The problem is that it immediately scrolls off the screen and I can't see it.



I was using the latest Fedora on someone's Macbook yesterday and fdisk would pause with a : (like the output of less and allow scrolling or q to break from the output.



I am running CentOS 7.5 in text mode from a minimal install on a VGA monitor connected through an HDMI adapter to the system.



Is this a limitation of my terminal, being in text mode (fdisk on the Macbook was run in a terminal on GNOME), the fact that it's an older version of fdisk, or something else entirely?



enter image description here










share|improve this question





















  • doesn't Shift-PageUp work anymore?
    – mosvy
    Nov 30 at 1:58










  • That's a thought - but he's using a MacBook (take a look at the keyboard). If it's recent hardware: no, he doesn't have that key :-)
    – Thomas Dickey
    Nov 30 at 2:07






  • 2




    Oops. But If Fn+Shift+Up doesn't work instead of Shift+PageUp, it's a bug.
    – mosvy
    Nov 30 at 2:18










  • Most terminal emulators have scrollback.
    – D. Ben Knoble
    Nov 30 at 4:15












up vote
1
down vote

favorite









up vote
1
down vote

favorite











I am running fdisk on a device and I'm trying to list the supported partition types. The problem is that it immediately scrolls off the screen and I can't see it.



I was using the latest Fedora on someone's Macbook yesterday and fdisk would pause with a : (like the output of less and allow scrolling or q to break from the output.



I am running CentOS 7.5 in text mode from a minimal install on a VGA monitor connected through an HDMI adapter to the system.



Is this a limitation of my terminal, being in text mode (fdisk on the Macbook was run in a terminal on GNOME), the fact that it's an older version of fdisk, or something else entirely?



enter image description here










share|improve this question













I am running fdisk on a device and I'm trying to list the supported partition types. The problem is that it immediately scrolls off the screen and I can't see it.



I was using the latest Fedora on someone's Macbook yesterday and fdisk would pause with a : (like the output of less and allow scrolling or q to break from the output.



I am running CentOS 7.5 in text mode from a minimal install on a VGA monitor connected through an HDMI adapter to the system.



Is this a limitation of my terminal, being in text mode (fdisk on the Macbook was run in a terminal on GNOME), the fact that it's an older version of fdisk, or something else entirely?



enter image description here







centos fdisk






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 30 at 1:33









Zhro

342313




342313











  • doesn't Shift-PageUp work anymore?
    – mosvy
    Nov 30 at 1:58










  • That's a thought - but he's using a MacBook (take a look at the keyboard). If it's recent hardware: no, he doesn't have that key :-)
    – Thomas Dickey
    Nov 30 at 2:07






  • 2




    Oops. But If Fn+Shift+Up doesn't work instead of Shift+PageUp, it's a bug.
    – mosvy
    Nov 30 at 2:18










  • Most terminal emulators have scrollback.
    – D. Ben Knoble
    Nov 30 at 4:15
















  • doesn't Shift-PageUp work anymore?
    – mosvy
    Nov 30 at 1:58










  • That's a thought - but he's using a MacBook (take a look at the keyboard). If it's recent hardware: no, he doesn't have that key :-)
    – Thomas Dickey
    Nov 30 at 2:07






  • 2




    Oops. But If Fn+Shift+Up doesn't work instead of Shift+PageUp, it's a bug.
    – mosvy
    Nov 30 at 2:18










  • Most terminal emulators have scrollback.
    – D. Ben Knoble
    Nov 30 at 4:15















doesn't Shift-PageUp work anymore?
– mosvy
Nov 30 at 1:58




doesn't Shift-PageUp work anymore?
– mosvy
Nov 30 at 1:58












That's a thought - but he's using a MacBook (take a look at the keyboard). If it's recent hardware: no, he doesn't have that key :-)
– Thomas Dickey
Nov 30 at 2:07




That's a thought - but he's using a MacBook (take a look at the keyboard). If it's recent hardware: no, he doesn't have that key :-)
– Thomas Dickey
Nov 30 at 2:07




2




2




Oops. But If Fn+Shift+Up doesn't work instead of Shift+PageUp, it's a bug.
– mosvy
Nov 30 at 2:18




Oops. But If Fn+Shift+Up doesn't work instead of Shift+PageUp, it's a bug.
– mosvy
Nov 30 at 2:18












Most terminal emulators have scrollback.
– D. Ben Knoble
Nov 30 at 4:15




Most terminal emulators have scrollback.
– D. Ben Knoble
Nov 30 at 4:15










2 Answers
2






active

oldest

votes

















up vote
1
down vote













The latest Fedora is newer by a year or two than the latest RHEL 7. A newer fdisk is a possibility.



You could work around this by using script to capture the output, and using less on the resulting typescript file (running fdisk and less separately of course).



You could also use the scrolling feature in screen or tmux, but those typically are not installed initially on a Linux system — they're optional/extra features.






share|improve this answer






















  • He's talking Fedora and CentOS - both do that.
    – Thomas Dickey
    Nov 30 at 1:59

















up vote
0
down vote













Would



fdisk /dev/sdc <<<l | less


do?






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%2f485049%2fhow-to-read-the-output-from-an-interactive-program-without-it-scrolling-off-the%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    1
    down vote













    The latest Fedora is newer by a year or two than the latest RHEL 7. A newer fdisk is a possibility.



    You could work around this by using script to capture the output, and using less on the resulting typescript file (running fdisk and less separately of course).



    You could also use the scrolling feature in screen or tmux, but those typically are not installed initially on a Linux system — they're optional/extra features.






    share|improve this answer






















    • He's talking Fedora and CentOS - both do that.
      – Thomas Dickey
      Nov 30 at 1:59














    up vote
    1
    down vote













    The latest Fedora is newer by a year or two than the latest RHEL 7. A newer fdisk is a possibility.



    You could work around this by using script to capture the output, and using less on the resulting typescript file (running fdisk and less separately of course).



    You could also use the scrolling feature in screen or tmux, but those typically are not installed initially on a Linux system — they're optional/extra features.






    share|improve this answer






















    • He's talking Fedora and CentOS - both do that.
      – Thomas Dickey
      Nov 30 at 1:59












    up vote
    1
    down vote










    up vote
    1
    down vote









    The latest Fedora is newer by a year or two than the latest RHEL 7. A newer fdisk is a possibility.



    You could work around this by using script to capture the output, and using less on the resulting typescript file (running fdisk and less separately of course).



    You could also use the scrolling feature in screen or tmux, but those typically are not installed initially on a Linux system — they're optional/extra features.






    share|improve this answer














    The latest Fedora is newer by a year or two than the latest RHEL 7. A newer fdisk is a possibility.



    You could work around this by using script to capture the output, and using less on the resulting typescript file (running fdisk and less separately of course).



    You could also use the scrolling feature in screen or tmux, but those typically are not installed initially on a Linux system — they're optional/extra features.







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Nov 30 at 1:51

























    answered Nov 30 at 1:44









    Thomas Dickey

    51.8k594164




    51.8k594164











    • He's talking Fedora and CentOS - both do that.
      – Thomas Dickey
      Nov 30 at 1:59
















    • He's talking Fedora and CentOS - both do that.
      – Thomas Dickey
      Nov 30 at 1:59















    He's talking Fedora and CentOS - both do that.
    – Thomas Dickey
    Nov 30 at 1:59




    He's talking Fedora and CentOS - both do that.
    – Thomas Dickey
    Nov 30 at 1:59












    up vote
    0
    down vote













    Would



    fdisk /dev/sdc <<<l | less


    do?






    share|improve this answer
























      up vote
      0
      down vote













      Would



      fdisk /dev/sdc <<<l | less


      do?






      share|improve this answer






















        up vote
        0
        down vote










        up vote
        0
        down vote









        Would



        fdisk /dev/sdc <<<l | less


        do?






        share|improve this answer












        Would



        fdisk /dev/sdc <<<l | less


        do?







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 30 at 18:47









        RudiC

        3,7171312




        3,7171312



























            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%2f485049%2fhow-to-read-the-output-from-an-interactive-program-without-it-scrolling-off-the%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

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

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay