Command line: How do you keep the output from scrolling out of sight?

2011-03-01 Thread Jason Hsu
I'm using Debian in a command-line-only installation for running a 
firewall/server.

I know that I'm supposed to use the messages I see every time I enter a command 
for troubleshooting purposes.  But if the output is too long, then the first 
messages scroll out of sight, and that makes it impossible to properly 
troubleshoot when I don't know what I'm doing.  Is there a way to get the 
output to temporarily stop so I can read it all if I wish?

-- 
Jason Hsu jhsu802...@jasonhsu.com


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20110301105932.99d1a32c.jhsu802...@jasonhsu.com



Re: Command line: How do you keep the output from scrolling out of sight?

2011-03-01 Thread Wayne Topa

On 03/01/2011 11:59 AM, Jason Hsu wrote:

I'm using Debian in a command-line-only installation for running a 
firewall/server.

I know that I'm supposed to use the messages I see every time I enter a command 
for troubleshooting purposes.  But if the output is too long, then the first 
messages scroll out of sight, and that makes it impossible to properly 
troubleshoot when I don't know what I'm doing.  Is there a way to get the 
output to temporarily stop so I can read it all if I wish?



Have you tries the he 'Scroll Lock' key?


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org

Archive: http://lists.debian.org/4d6d298c.10...@gmail.com



Re: Command line: How do you keep the output from scrolling out of sight?

2011-03-01 Thread John A. Sullivan III
On Tue, 2011-03-01 at 10:59 -0600, Jason Hsu wrote:
 I'm using Debian in a command-line-only installation for running a 
 firewall/server.
 
 I know that I'm supposed to use the messages I see every time I enter a 
 command for troubleshooting purposes.  But if the output is too long, then 
 the first messages scroll out of sight, and that makes it impossible to 
 properly troubleshoot when I don't know what I'm doing.  Is there a way to 
 get the output to temporarily stop so I can read it all if I wish?
 
 -- 
 Jason Hsu jhsu802...@jasonhsu.com
 
 
Yes, you can either use SHIFTPgUp and PgDn or you can pipe it
through less (or more), e.g., ls /usr/bin | less

Hope that's what you're looking for - John


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/1298999832.12172.2.ca...@denise.theartistscloset.com



Re: Command line: How do you keep the output from scrolling out of sight?

2011-03-01 Thread Boyd Stephen Smith Jr.
On 2011-03-01 10:59:32 Jason Hsu wrote:
I know that I'm supposed to use the messages I see every time I enter a
command for troubleshooting purposes.  But if the output is too long, then
the first messages scroll out of sight, and that makes it impossible to
properly troubleshoot when I don't know what I'm doing.  Is there a way to
get the output to temporarily stop so I can read it all if I wish?

less / more / pg for interactive viewing.
redirection / tee for persisting output and reviewing both now and later.
script for saving both input and output with the ability to reply the session.

HTH
-- 
Boyd Stephen Smith Jr.   ,= ,-_-. =.
b...@iguanasuicide.net  ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-'
http://iguanasuicide.net/\_/


signature.asc
Description: This is a digitally signed message part.


Re: Command line: How do you keep the output from scrolling out of sight?

2011-03-01 Thread Chris Jackson
Jason Hsu wrote:

 I'm using Debian in a command-line-only installation for running a 
 firewall/server.
 
 I know that I'm supposed to use the messages I see every time I enter a 
 command for troubleshooting purposes.  But if the output is too long, then 
 the first messages scroll out of sight, and that makes it impossible to 
 properly troubleshoot when I don't know what I'm doing.  Is there a way to 
 get the output to temporarily stop so I can read it all if I wish?
 


On most terminals:

CTRL-S will stop output

CTRL-Q will restart it

Note that if it runs out of buffer space the process will stop, blocking
on output.

Also, possibly useful, SHIFT-PgUp may scroll back half a page (but it
drops back to the bottom when there's new output)

Other useful things may be to pipe the output through less (which
presents it one page at a time) or tee (which will save it to a file,
and you can look through the file from another termianal while output
continues on the main one). Check out the man pages for those two things
if they seem useful.

If you're not sure about piping things to other things, you need to read
up on how to use the command line. This site seems as good as any, but a
web search will provide many others:

http://linuxcommand.org/

--
Chris Jackson
Shadowcat Systems Ltd.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4d6d2b63.70...@shadowcat.co.uk



Re: Command line: How do you keep the output from scrolling out of sight?

2011-03-01 Thread Dr. Ed Morbius
on 10:59 Tue 01 Mar, Jason Hsu (jhsu802...@jasonhsu.com) wrote:
 I'm using Debian in a command-line-only installation for running a
 firewall/server.
 
 I know that I'm supposed to use the messages I see every time I enter
 a command for troubleshooting purposes.  But if the output is too
 long, then the first messages scroll out of sight, and that makes it
 impossible to properly troubleshoot when I don't know what I'm doing.
 Is there a way to get the output to temporarily stop so I can read it
 all if I wish?

As others have noted:

   command | less

Or an alternate pager, from least to most featured: pg, more, most, dog.
You can specify this with the PAGER environment variable or under
/etc/alternatives/pager (see update-alternatives).

You can dump output to a file.  Several varaints:

command myfile   # save standard output
command myfile 21  # save standard output  standard error
command myfile 2myfile.err  # separate stdout/stderr
command /dev/null# discard stdout (stderr displayed to terminal)
command | tee myfile  # view output, save stdout to 'myfile'
command 21 | tee myfile # view output, both stdout  stderr to 'myfile'


Your terminal's scrollbar should be generally useful.  Set a
sufficiently large scrollback buffer.

Page-up / page-down, may work in some terminals and/or console.

The 'script' command can be used to record interactive sessions.
Depending on the amount of screen-painting going on (ncurses /
full-screen terminal programs such as top, etc.), this may not be too
readable.  'scriptreplay' may make for a saner output.

Using 'screen' one of the benefits is a scrollback buffer.  Very handy.


For noninteractive comamnds, where I want to massage the output but
don't know what filters I need to use immediately (or want to see
intermediate results):

command | vim -   # read stdout into vim for interactive editing.


I can then annotate or use futher regex substitutions or commands to
clean up / modify data.


Mostly I just pipe output to less or redirect to a file as needed.

-- 
Dr. Ed Morbius, Chief Scientist /|
  Robot Wrangler / Staff Psychologist| When you seek unlimited power
Krell Power Systems Unlimited|  Go to Krell!


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20110301201028.gc5...@altaira.krellpowersys.exo