LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to unlimit page up & down in console (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-unlimit-page-up-and-down-in-console-4175506259/)

EDDY1 05-28-2014 02:44 AM

How to unlimit page up & down in console
 
When in console if I call for dmesg or /var/log/messages the output is so long I can't view the whole message. what config file would I have to change to remove the limit. I believe that I'm only able to go up approximately 2 1/2 pages.

shivaa 05-28-2014 03:19 AM

In order to open any file, to read it in a page by page manner, you should use more command instead of cat. On the other hand, for command like dmesg, there's no specific file to modify page limit, but you need to change scrolling limit of the console. For instance, in gnome desktop, open the console/terminal > Open Edit tab and go to 'Profile Preferences' option, then under 'Profile Preference' window, go to 'Scrolling' tab and there you can set the scrolling limit (by default it is set to 512 lines only). You can set it to millions or billions of lines to scroll up e.g. 5120000.

chrism01 05-28-2014 03:48 AM

You can more a file as described, or eg if you run dmesg as a cmd, you can pipe it through more
Code:

dmesg|more
or just re-direct to a file and use eg vim to read the file.

EDDY1 05-28-2014 11:30 AM

@shivaa thank you for your reply I already have my terminal set to unlimited, I was actually just wanting to be able to read messages in console, in case my system goes down & I need to view files from the recovery console.

@chrismo that was exactly what I was talking about, I just switched to console & was able to read the whole message.

frankbell 05-28-2014 08:21 PM

You can also pipe the output to a file, then open the file with (more or) less or with a text editor.

Code:

$ dmesg > dmesg.txt
$ less dmesg.txt


EDDY1 05-28-2014 11:01 PM

Quote:

Originally Posted by frankbell (Post 5178391)
You can also pipe the output to a file, then open the file with (more or) less or with a text editor.

Code:

$ dmesg > dmesg.txt
$ less dmesg.txt


I will also try this as I know that these are the things that I need to know

Shadow_7 05-29-2014 07:04 AM

$ echo $HISTCONTROL
$ echo $HISTSIZE
$ echo $HISTFILESIZE

Your .bashrc might set those values. For large files less is better than more. On my debian install 500 seems to be the default for HISTSIZE and HISTFILESIZE.

$ cat FILE | less

Less gives you a full scroll where more might not. Plus man page type hotkey functionality to goto top [HOME] or bottom [END] and search [/]words.


All times are GMT -5. The time now is 03:55 PM.