The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Increase the buffer size to read lengthy lines ssunda6 Shell Programming and Scripting 3 03-17-2008 12:45 AM
Expect buffer size increase, please help jaduks Shell Programming and Scripting 1 10-12-2007 08:07 AM
How to increase buffer size in Unix ziabegg UNIX for Dummies Questions & Answers 3 01-05-2007 11:17 AM
How to increase the buffer size in Unix ziabegg UNIX for Advanced & Expert Users 0 12-22-2006 11:11 PM
buffer cache size gsr_kashyap Linux 0 09-06-2006 10:34 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-24-2007
Registered User
 

Join Date: Apr 2007
Posts: 75
how to increase size of the console screen buffer ?

Its difficult to explain what I am exactly looking for, so let me try with an example..
Suppose my program prints out thousands lines. But once my program ends.. I am not able to scroll up and see all the 1000 lines. The size of the screen buffer is obviously limited. Is there anyway I can increase this size ?

If there is a way, then is there any harm in increasing the size?
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 04-24-2007
Registered User
 

Join Date: Sep 2002
Location: San Fran
Posts: 108
what flavor is your OS?
what terminal software (xterm, gterm...)?

Worst case, you redirect the output to a text file (which is kinda better from a resource usage perspective...)
Reply With Quote
  #3 (permalink)  
Old 04-24-2007
Registered User
 

Join Date: Apr 2007
Posts: 75
SunOS

and how do I find out which terminal software ???

hmm, yea I can redirect the output.. but lets say its an interactive application... hmm well... lets just suppose u dont want to direct the output to a text file.
Reply With Quote
  #4 (permalink)  
Old 04-25-2007
Registered User
 

Join Date: Jan 2007
Posts: 13
dependant on the terminal software that you're using, quite a few have an option somewhere that you can change to show the number of lines of 'history'
PuTTY for example.

Alternatively, if you need to interactively run a program, you could always use 'typescript'

1) type "typescript" at the prompt, then run your program.
2) everything outputted to screen now goes to a file called 'typescript' including your key inputs.
3) ctrl-d at the end to stop typescript.

Hope that makes sense, I've not explained it that clearly.
Reply With Quote
  #5 (permalink)  
Old 04-25-2007
cfajohnson's Avatar
Registered User
 

Join Date: Mar 2007
Location: Toronto, Canada
Posts: 713
Quote:
Originally Posted by the_learner
Its difficult to explain what I am exactly looking for, so let me try with an example..
Suppose my program prints out thousands lines. But once my program ends.. I am not able to scroll up and see all the 1000 lines. The size of the screen buffer is obviously limited. Is there anyway I can increase this size ?

Are you talking about a real or virtual console (e.g., such as you get on a Linux system with Ctrl-Alt-F1), or a terminal window (e.g., xterm or rxvt in X)?

If the latter, the terminal program probably has an option to set the buffer size; in xterm and rxvt, it's -sl NUM, where NUM is the number of lines you want to save. See your terminal's man page for more details.

In either a console or a terminal window, you can use typescript to save the session to a file, or you can use a pager such as [i/less[/i] or more to display the output of the command:

Code:
COMMAND | less
Or redirect the output of the command to a file:

Code:
COMMAND > FILE
Quote:
If there is a way, then is there any harm in increasing the size?

So long as you don't exceed available memory, no.

Reply With Quote
  #6 (permalink)  
Old 04-25-2007
Registered User
 

Join Date: Apr 2007
Posts: 75
hey thanks guys, typescript is working. Only thingi s the command name was 'script' which created the file 'typescript'

Thanks again everyone !!
Reply With Quote
Google The UNIX and Linux Forums
Reply

Tags
linux

Thread Tools
Display Modes




All times are GMT -7. The time now is 12:06 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0