Click to See Complete Forum and Search --> : Have fun with more


jlmb
06-07-2003, 08:52 PM
Maybe everyone knows this but, oh well here i go:
Im using more version 5.19 (Berkeley 6/29/88) on a debian (testing) system.

Do more <filename> to a (*.gz, *.zip,*.png, etc, not text files), you'll get a lot of garbage on your output (thats what we want).

Now, "q" or c-break (control + break) gets your normal prompt back if the page % is 0---> ( --More--(0%) ).

If you hit "spacebar" (next page), or enter until page percentage is >= 1, you'll get a garbaged screen. Stopping more with "q" or c-break while garbaged gets you a garbaged prompt. You still can input normally while garbaged but can't read what is typed (unless you read garbaged text :D ).

To fix this, is easy, just "q" or c-break more with 0%.

Try on an xterm until you understand what i said (sorry for my bad english), that way you can close it since logging out from the garbaged console won't fix it.

less won't let you do it, atleast not to me, also i believe that less has some addons to display *.gz etc. (not sure though)

Have fun

stiles
06-07-2003, 09:20 PM
I don't understand the point other than the behavior of more. If you do garble your tty do this to fix it (you cat a binary or something like that):

<ctrl>+v <Esc>+c

jlmb
06-07-2003, 09:45 PM
I was just focusing on more.
You can garble a friend tty or something but you are right, the main point is more behavior.

By the way, after cat a binary strange things happen to my xterm. c-L wont clean my xterm among others.

serz
06-07-2003, 09:53 PM
True. Tried it and it happened what you said. Had to close and open a new xterm :p

Strogian
06-07-2003, 10:07 PM
Yeah.. it only works that way with some files, though. Specifically, if the contents of the file cause More to pause before screwing up your terminal, then it works that way. :) But if the right bytes are displayed before more pauses, then it'll screw it up on the first page.

bwkaz
06-07-2003, 10:30 PM
Sometimes doing an stty sane will fix a garbled terminal.

If that doesn't, then I've seen the "Ctrl+V Esc C" thing work a few times. No idea what it does, but hey, whatever. ;)

I think sometimes a Ctrl+X Ctrl+R (reread the readline init file) might help, too, but I don't think it helps in this case.

jlmb
06-07-2003, 11:15 PM
ctrl+v Esc C just starts a new line. Just like "Enter" in a command clear prompt

oh well, i still have a looooooooootttttttttttt to learn! :D

Strogian
06-07-2003, 11:21 PM
Ctrl+V, Ctrl+O, <enter> is what I usually do. stty -a tells you what it does, but I've never really looked into it. I just picked it up somewhere.. :)