0

First time unix user here. How do I scroll and/or page the output within the console in Open Indiana?

If I list the help page for the zfs command it just outputs everything and I can't read it since it just scrolls by. I tried piping it to the less command but when I press w to scroll up it outputs a page of rows with ~.

Tried saving the ouput in a textfile with zfs -help > filename but the file shows up as empty in vim.

I'm running within Vbox and are logged on locally.

2
  • have you tried pageup? Mar 25, 2012 at 18:06
  • Yes, the last line after listing the zfs help says (END) and every button I press results in the console printing a full screen which is empty except one ~ at the beginning of each row. And the prompt says (END) just as before. Pressing h/H brings upp the less help screen and q quits so some command work, not just scrolling.
    – Molotch
    Mar 25, 2012 at 21:20

1 Answer 1

3

If you're in a VT (Virtual Terminal), you can usually scroll with Ctrl+Page Up and Ctrl+Page Down.

If you're in a GUI, there should be a scrollbar, or you can try the same key combination.

In either environment, you can pipe the command to less, like so:

zfs | less

Within less, you can use Page Up, Up, Page Down, Down just as you'd expect. Q will quit. I'd suggest learning less, as it has many advanced features. For example, you can forward-search with / and reverse-search with ?.

man less for more information.

3
  • Thanks, something is wonky. If I scroll down by using e or z I can scroll up again (when I bring up the less help screen it pauses showing one screen at a time, so I am able to use e or z) to the point from where I scrolled down, but not further up. But if the console just lists something I can't scoll up again.
    – Molotch
    Mar 25, 2012 at 21:32
  • Tried ctrl+pgup/down and the other less commands but it did not work either. Can I attribute this to running within vbox or could it be a configuration matter?
    – Molotch
    Mar 25, 2012 at 21:36
  • Ctrl+pgup/down aren't less commands, just pgup/down are. The Ctrl sequences are for VTs (i.e. console outside of GUI).
    – Kyle Smith
    Mar 26, 2012 at 3:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .