Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Is there any way to quickly scroll through text-heavy output in Terminal such as man pages ? Using the up and down arrows only move the screen one line at a time; is there any way to scroll faster?

share|improve this question
3  
The most direct answer to your question is: In Terminal's default keyboard map, adding the Shift modifier to Page Up/Down and Home/End will send scrolling commands to the tty instead of scrolling the terminal view. You can customize the keyboard map if you want to make it send scrolling commands without requiring the Shift modifier. –  Chris Page Sep 8 '11 at 12:27

6 Answers 6

up vote 27 down vote accepted

If I understood you correctly, you want to skim through manual pages more efficiently.

By default, man uses less as its pager. In less, you can use:

  • Space or F or Control ⌃-F to advance one page
  • D or Control ⌃-D to advance half a page
  • B or Control ⌃-B to go back one page
  • U or Control ⌃-U to go back half a page

You can get the full list of less keyboard commands in its manual page. If you don't like the default pager, you can set MANPAGER or PAGER environment variables to specify a different program for controlling the pagination of man pages that are longer than one screen.

share|improve this answer
1  
You can also press h when viewing man pages to show help. –  Slomojo Sep 7 '11 at 0:32
2  
/ starts search mode, which lets you jump to a word of your choice. –  user588 Sep 7 '11 at 3:29
    
And p and n focus the previous and next results in search modes. –  Lri Aug 21 '12 at 9:37
    
On Mac, B seems to head to the bottom of the page instead of going back one page. Other keys work as you said. –  kakyo Jan 9 at 18:56

You can open man pages in a single, scrollable window from Terminal's Help menu. Just type the command into the search field in the Help menu, then click the command in the search results to open its man page. It may occasionally take a few seconds for the command to appear in the search results.

You can also find most man pages online, with Apple-specific man pages found on apple's developer library. I generally google with apple man [command] replacing [command] with the actual command. One nice thing about this method is you can easily bookmark man pages you use frequently.

share|improve this answer
2  
Searching for man pages in the Help menu works in Snow Leopard (10.6) as well. Lion has a number of enhancements: There are convenient commands in the Help menu to look up man pages for selected text, and they're available in the contextual menu, as well as Services so you can use them from other applications (you have to enable them in System Preferences > Keyboard > Keyboard Shortcuts > Services). You can also Command-Double-Click to open man page references "open(1)" and URLs "x-man-page://1/open" for easy navigation between man pages. –  Chris Page Sep 8 '11 at 12:13
2  
If there is no selection, the Help menu commands will look to the left of the cursor for a search term or man page reference. I use this all the time to look up a command after beginning to enter it on the command line. The "Open man Page" commands are the equivalent of man and "Search in man Pages" are equivalent to apropos. The Help menu and contextual menus recognize man page references in the form "1 open", "open 1" and "open(1)", as well as "x-man-page://1/open". –  Chris Page Sep 8 '11 at 12:15
2  
Man page terminals use the "Man Page" settings profile, so you can customize their appearance. Because the default window position is remembered separately for each profile, you can place man page windows conveniently on screen and new ones will show up in the same location (I place them at the right edge of the display, so they don't cover my primary terminal windows). –  Chris Page Sep 8 '11 at 12:21
1  
Also, if there are no running processes, Terminal supports a few pager commands. These are especially convenient for reading man pages: Space/Shift-Space = Page down/up, f/b = Page down/up, Return = Line down, Up/Down Arrow = Line up/down, </> = Home/End –  Chris Page Sep 8 '11 at 12:21
    
Thanks @ChrisPage — meta.apple.stackexchange.com/q/1247/8546 proposes hyperlinking of x-man-page:// URLs. –  Graham Perrin Mar 31 '12 at 17:22

Shift ⇧-Page Up ⇞ and Shift ⇧-Page Down ⇟ will move man pages a page at a time.

(On a laptop or other smaller keyboard, the keystrokes are usually Shift ⇧-Fn-Up Arrow ↑ and Shift ⇧-Fn-Down Arrow ↓.)

share|improve this answer
    
For me, on OSX 10.8, the key combinations are [fn]-[up] and [fn]-[down] respectively. –  user456584 Oct 18 '12 at 22:06

For non-Apple specific commands which tend to be the same across various UNIX platforms something I do is Google man [command] in a browser. The top result will almost always be an HTML-ified man page.

share|improve this answer

This answer gets around your question: Install Bwana.

This will open man pages in the browser. I've used this for years and it's one of my favorite additions for Terminal functionality.

share|improve this answer

I would recommend ManOpen, which allows you to open a man page in a normal text window.

You can also create an alias (let me know if you need help with this) using

pman()
        {
        man -t "${1}" | open -f -a /Applications/Preview.app/
        }          
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.