Find the answer to your Linux question:
Results 1 to 6 of 6
Yeah, Centos 5 running in text mode, no X-window or Desktop environment. Ran a Commnd hdparm -I /dev/hdd then my screen got flooded with text, all I see is the ...
  1. #1
    Linux Newbie Mad Professor's Avatar
    Join Date
    May 2006
    Posts
    128

    [SOLVED] how do you scroll up in text mode?

    Yeah, Centos 5 running in text mode, no X-window or Desktop environment.

    Ran a Commnd

    hdparm -I /dev/hdd

    then my screen got flooded with text, all I see is the end of the output.

    Which doesn't give me the information I need.

    How does one read the output after a command?

  2. #2
    Linux User vickey_20's Avatar
    Join Date
    Mar 2009
    Location
    Mumbai, India
    Posts
    493

    Use the 'less' command

    In case more information is displayed on the system and you find yourself at the bottom use the 'less' command to hold the output. Usage
    Code:
    cmd|less
    Then use the normal arrow keys to navigate.
    Only if I could understand the man pages
    Registered Linux user #492640
    OS: RHEL4,5 ,RH 9,Ubuntu

  3. #3
    Linux Newbie egan's Avatar
    Join Date
    Feb 2009
    Location
    Mountain View, CA
    Posts
    132
    Most of the time I pipe it through less.
    i.e.
    hdparm -l /dev/hdd | less
    Then you can use most of the vi commands to read the text:
    j - up
    k - down
    G - bottom
    g - top
    C-D - page down
    C-U - page up
    / - search
    n - next (search term)
    N - previous (search term)
    q - quit

    EDIT: Too slow!

  4. #4
    Linux Guru
    Join Date
    Nov 2004
    Posts
    6,110
    If you find you do need to scroll up in a bash terminal after the fact, you can do so with Shift+PgUp, though I would recommend the use of less or a similar texttrap. You can pipe it to a file for later perusal while letting it still go to your screen if you use tee
    Code:
    hdparm -l /dev/hdd |tee logfile.log
    This will let run as normal but also put its contents into logfile.log.

  5. #5
    Linux User Krendoshazin's Avatar
    Join Date
    Feb 2005
    Location
    London, England
    Posts
    385
    As other have said you can pipe the command through less. However, when the output is scrolling you can use scroll lock (Ctrl+s) to stop the text scrolling and Shift+PgUp to scroll back over what has already been displayed. Use Ctrl+q to unlock scroll lock and resume scrolling. This will work for any screen output such as kernel boot messages and compiler output.

  6. #6
    Linux Newbie Mad Professor's Avatar
    Join Date
    May 2006
    Posts
    128
    Thank you guys, I got three new ways to scroll in text mode.

Posting Permissions

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