FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 12-07-2011, 02:36 AM
Sushil Mantri
 
Default How do i scroll in bash using keyboard?

Hi all,

I have been a little bugged by this. I want to scroll up through the output of last executed command. I dont want to do 'less' or using <shift> + pageup.
I am using Ubuntu 11.04

Thanks,

Sushil

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 12-07-2011, 03:16 AM
Karl Auer
 
Default How do i scroll in bash using keyboard?

On Tue, 2011-12-06 at 22:36 -0500, Sushil Mantri wrote:
> I have been a little bugged by this. I want to scroll up through the
> output of last executed command. I dont want to do 'less' or using
> <shift> + pageup.

Maybe you should tell us how you imagine it working. If you don't put
the output somewhere where you can read it, then your only option is the
scroll-back buffer of the terminal window.

For console terminals (i.e., if you are not using a graphical user
interface) you will probably not be able to use a mouse to scroll up,
and the shit-pgup method is about all you have. If you are using a
terminal window in a graphical user interface, then you should be able
to use the scroll wheel (of the thumb in a scroll bar) to scroll up and
down in the output of past commands. Depending on the terminal windows
software you are using you should be able to adjust the size of the
scroll-back buffer to a size that suits you. I generally set it to a
very big number.

There are a few options for storing the output from commands. Obviously
these may be less useful if the output is not text!

The "script" will put an entire session and every keystroke into a file
for later perusal:

script
command
command
command...
exit

Or just redirect the output from a command into a file and look at it
when the command has finished ("2>&1" redirects error messages as well):

command > file.txt 2>&1

Or you can use "tee" to redirect output into a file AND get it into
less:

command | tee file.txt | less

Or even into multiple files:

command | tee file1.txt | tee file2.txt | file3.txt > file4.txt

Or you can watch the output from something as it happens using tail - in
another window, or the same window if the command is running in the
background:

command > file.txt 2>&1 &
tail -f file.txt

Note: Command syntax off the top of my head - apply with caution :-)

Regards, K.

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~
Karl Auer (kauer@biplane.com.au) +61-2-64957160 (h)
http://www.biplane.com.au/kauer/ +61-428-957160 (mob)

GPG fingerprint: AE1D 4868 6420 AD9A A698 5251 1699 7B78 4EEE 6017
Old fingerprint: DA41 51B1 1481 16E1 F7E2 B2E9 3007 14ED 5736 F687

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 08:34 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org