CentOS Linux Server Guide

Displaying text by pages in CentOS Linux

more command is used to output or display text one screen at a time.

  • This command different from cat command. The cat command will only display the last part of the file on screen. However, using more command, you will can viewing the entire content of the file in page by page simply  pressing spacebar.

 

Command and Options:

more  [options] filename

 

- uniq command by default (without using any options) is to remove any duplicate lines only.

 

Option:

 
Options   Description
-s squeezing multiple blank lines into one
-d prompt user with a message suggesting the next session
-c displaying on each screen and clear the remaining of each line as it is displayed.
+/character string specifies a string that will be searched for before each file is displayed, and displays text  text two lines before the string appears at first time

 

Examples:

 

The the following example will display file content on screen one at a time
more mail.log

 

The following example example will squeeze multiple blank lines into one
uniq  -s A.log

 

The following example is combining list command so that the result can be listed one page at a time
ls -l | more

 

Keyboard Operations:

 
Keyboard key function
space bar scroll down one screen at a time
enter scroll one line at a time
q quit the view operation mode

 

Back to Managing Files and Folders in CentOS Linux

 



Copyright 2011 http://www.1a-centosserver.com All Rights Reserved

All trademarks are the property of their respective owners.

Contact Us | Terms of Use | Privacy Policy