Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Please Help with fdisk command!

    Hi, I m completely new to linux commands and I would like to check out something I cannot find browsing the net.

    if I introduce;

    fdisk -l

    Then my screen scrolls down and I cannot see the information from the first drives sda, sdb and sdc, just the end of the answer ; from sdd on, because I got several drives connected.

    How could I tell the machine show me results page after page?.

    Thanks for any help provided!: Regards!,

  2. #2
    Linux Guru
    Join Date
    Dec 2013
    Victoria, B.C. Canada
    You can use a pager; pipe the output to less or more.

    fdisk -l | less

  3. #3
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    pipe it into a pager, eg less
    fdisk -l |less
    You must always face the curtain with a bow.

  4. $spacer_open
  5. #4
    quiet funny, it works but... it does not bring me back to root@user # but I stay in a line that begins with : and then I try to type and it appears the word "mark" in blue... and well I m completely unsure about what to do inside the pager... so what should I type to go back to root@user # or to see the next piece of information and then going back to root?. Thanks a lot!,

  6. #5
    Just Joined! ugjka's Avatar
    Join Date
    May 2015
    type the letter q and hit enter, my guess

  7. #6
    Penguin of trust elija's Avatar
    Join Date
    Jul 2004
    Either at home or at work or down the pub
    Press page down and page up to navigate and q to quit
    Should you be sitting wondering,
    Which Batman is the best,
    There's only one true answer my friend,
    It's Adam Bloody West!

    The Fifth Continent

  8. #7
    The pager, such as "less" is a program that takes the results of a command, fdisk in this case, and puts those results on the screen in a form that you can navigate so you can look at all the output if it is more than one screenful. You lose access to the command prompt when you are in the pager, so you have to leave the pager to get back to the command prompt where you can enter commands again. Hence the suggestions of using q to quit the pager.

    If you are in a terminal when you run the command and you get more than a screenful of information, you can usually just use Shift+PageUp and Shift+PageDown to get to the earlier screens of info and back again to showing the prompt on the screen. Usually terminals have scroll bars that you can also use with a mouse to reach the earlier info by scrolling up.

  9. #8
    man less

  10. #9
    The man pages have the information for commands, but they are terse and not always clear to the inexperienced user. Explanations on the usage of commands, provided by users with some experience, put in ordinary language, can often be more useful to new users such as the OP. That's not to discourage consulting man pages. They become indispensable and can even be satisfying bedtime reading for some

  11. #10
    I probably could have added a little more. One of the side effects of posting from the phone and forgetting about it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts