PDA

View Full Version : [ubuntu] [SOLVED] command line scrolls past what i need to read


adept_king
October 23rd, 2008, 01:24 PM
Im using Ubuntu Server.

There is only a command line, of course, but sometimes the screen shoots by without a pause. is there a way to make the screen pause at every full screen of text? a toggle for this?

lets say i do ls --help and want to read the full entry instead of just the end.

by the way,
Ubuntu Server is beating the utter crap out of me.

Krupski
October 23rd, 2008, 01:27 PM
Im using Ubuntu Server.

There is only a command line, of course, but sometimes the screen shoots by without a pause. is there a way to make the screen pause at every full screen of text? a toggle for this?

lets say i do ls --help and want to read the full entry instead of just the end.

by the way,
Ubuntu Server is beating the utter crap out of me.

Use the "more" command. You can take the output of anything and pipe it through "more" - it will display one page at a time.

Examples:


ls -laF /home/big-directory | more

cat huge-document | more

command --help | more



Hope this helps.

-- Roger

sisco311
October 23rd, 2008, 01:31 PM
sometimes less is more ;)

ls --help | less

koenn
October 23rd, 2008, 01:36 PM
+1 for less
it allows you to scroll up and down the text

adept_king
October 23rd, 2008, 02:27 PM
thanks folks!

now to the next mystery...

sisco311
October 23rd, 2008, 02:40 PM
You're welcome!

Please mark the thread solved by selecting
Mark this thread as solved from the Thread Tools.

lykwydchykyn
October 23rd, 2008, 04:22 PM
Sometimes, you need the most:

sudo aptitude install most
ls --help |most

Krupski
October 23rd, 2008, 09:38 PM
Sometimes, you need the most:

sudo aptitude install most
ls --help |most


More... less... most...least...


How about "ls | maybe"?

:)

lykwydchykyn
October 24th, 2008, 12:40 AM
More... less... most...least...


How about "ls | maybe"?

:)

Heh... here you go. Just pop this into a file called "maybe", make it executable, and drop it into /usr/local/bin:


#!/bin/bash

DOIT=$(($RANDOM%2))
read input
if [ 0 -eq $DOIT ] ; then
echo $input
else
echo "meh, not this time..."
fi

DGortze380
October 24th, 2008, 12:42 AM
Heh... here you go. Just pop this into a file called "maybe", make it executable, and drop it into /usr/local/bin:


#!/bin/bash

DOIT=$(($RANDOM%2))
read input
if [ 0 -eq $DOIT ] ; then
echo $input
else
echo "meh, not this time..."
fi


:lolflag:

hyper_ch
October 24th, 2008, 04:40 AM
you could also

(a) output the text into a file

COMMAND > output.txt


or

(b) run a "screen" sessions and scroll back with ctrl-a + ESC