How to page up/page down in Terminal?

Discussion in 'Mac Basics and Help' started by nermal0, Jun 5, 2006.

  1. nermal0 macrumors regular

    Joined:
    May 31, 2006
    Location:
    Germany
    #1
    Hi!

    This is a very simple question from a Mac newbie: how do I scroll pagewise in Terminal using the keyboard? I need to "scroll back" in the terminal pagewise and I also need to scroll up/down pagewise in manpages.

    Maybe getting a laptop with Page Down/Up keys missing wasn't such a great idea after all ;)

    Thanks,

    Christoph
     
  2. plinden macrumors 68040

    plinden

    Joined:
    Apr 8, 2004
    #2
    My wife's MacBook is at home, but does Fn+up arrow work?
     
  3. nermal0 thread starter macrumors regular

    Joined:
    May 31, 2006
    Location:
    Germany
    #3
    it does the trick for the scroll buffer, thanks.

    But how do I send a "Page Up / Page Down" to programs running in the terminal (e.g. man)?

    Thanks,

    Christoph
     
  4. plinden macrumors 68040

    plinden

    Joined:
    Apr 8, 2004
    #4
    Same as in Unix - "b" key back, space bar forward.

    I waited till I got home to test this out before answering - Fn+arrow up/down always acts like page up/page down using the key board, ie. it acts on the screen scroll.
     
  5. gekko513 macrumors 603

    gekko513

    Joined:
    Oct 16, 2003
    #5
    ctrl+f and ctrl+b also takes you a page down and page up respectively in things like "man" and "less". It seems to do exactly the same as space and b, but in case there are some situation where they don't work the same, I thought I'd mention it.
     
  6. nermal0 thread starter macrumors regular

    Joined:
    May 31, 2006
    Location:
    Germany
    #6
    Okay, it works for "less", but how can I really send a Page Up / Page Down key to an editor like emacs, jed or nano?

    Thanks,

    Christoph
     
  7. realityisterror macrumors 65816

    realityisterror

    Joined:
    Aug 30, 2003
    Location:
    Snellville, GA
    #7
    Well in pico you can use control + up/down to go up or down one line at a time, but I don't think it's possible to go a page at a time.
     
  8. mstoiber macrumors newbie

    Joined:
    Nov 16, 2011
    #8
    For some reason the terminal is mapping meta (usually option/alt) to the esc key. If you use esc + v you can page up, but to page up multiple times you have to release esc and hit esc + v again (as opposed to just continuing to hit v). Kind of annoying, but at least you can page up in emacs in a terminal window on a macbook. I just wish I hand't spent the last hour trying to figure this out, and I am kind of regretting getting a computer with out a page up and page down now. Hope this helps.
     
  9. transisthor macrumors newbie

    Joined:
    Jun 24, 2013
    #9
    You can optionally download a different program.

    I had the same problem and now use iTerm (free), and I can page up and down in vi, I didn't try emacs.

    I'm sure there's more if you search. Terminal is apparently garbage.

    EDIT: using Fn + up and down (so it's.. ok..)
     
  10. benwiggy macrumors 68020

    Joined:
    Jun 15, 2012
    #10
    Old thread, but I can't believe no one has posted the correct answer.

    If you've viewing man pages, or using "less" to view screensful of data, use "d" for down and "u" for up.
     
  11. dyn macrumors 68020

    Joined:
    Aug 8, 2009
    Location:
    .nl
    #11
    Because it only works in applications that use the Vi navigation keys. It doesn't work in irssi for example. I find shift-pgup and shift-pgdn to be the most useful as it works in almost any application. Pgup and pgdn are for scrolling back the Terminal buffer. You can change this in the Terminal settings though (reverse it for example: pgdn/up for man pages, shift-pgdn/up for buffer).
     
  12. karnadi macrumors newbie

    Joined:
    Jul 3, 2013
    #12
    In the Terminal, use:
    - Shift + Fn Up for PageUp,
    - Shift + Fn Down for PageDown,
    - Shift + Fn Left for Home,
    - Shift + Fn Right for End

    That's it. Simple. Works for all cases l know. I got this information from other forum and I think I should share it here :)
     
  13. KarenHeart macrumors newbie

    Joined:
    Jul 30, 2013
    #13
    Shortcuts for Safari (and maybe others)

    I just found that Command + Up takes you to the top of the web page, Command + Down takes you to the bottom. Option + Up/Down takes you one page back/forward. This last shortcut also works for .pdf files in the Preview app, but the Command shortcut doesn't. HTH.
     
  14. dyn macrumors 68020

    Joined:
    Aug 8, 2009
    Location:
    .nl
    #14
    This is a topic about Terminal. The keys are different in this application. Cmd-arrow up/down in Terminal is scroll 1 line up/down. You need to use shift-pgup and shift-pgdn to scroll 1 page up/down in something like a man page. You use pgup/pgdn to scroll through the Terminal buffer. Top/bottom would be home/end when you want to scroll the Terminal buffer or something like g and shift-g when using man.
     
  15. $yregnar86 macrumors newbie

    Joined:
    Jul 17, 2013
    #15
    more

    less

    this is what i use or I grep a line i want. you can view the syntax by 'man grep'
     
  16. szandor macrumors newbie

    Joined:
    Sep 19, 2007
    #16
    bless you my child.
     
  17. puh macrumors newbie

    Joined:
    Oct 31, 2014
    #17
    And starting with Yosemite it seems to be
    - Fn Up for PageUp,
    - Fn Down for PageDown,
    - Fn Left for Home,
    - Fn Right for End
    At least in emacs.
     

Share This Page