• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

more Command Examples in Linux

by admin

The main drawback of the cat command is that you can’t control what’s happening after you start it. To solve that problem, developers created the “more” command. The more command displays a text file but stops after it displays each page of data.

more is a filter that displays the contents of a text file on the terminal, one screenful at a time. It normally pauses after each screenful, and prints —More— at the bottom of the screen.

$ more filename

The

--More--(n%)

message appears at the bottom of each screen, where n% is the percentage of the file that has been displayed. When the entire file has been displayed, the shell prompt appears.

When the –More–(n%)prompt appears at the bottom of the screen, you can use the keys described in the table to scroll through the file.

Keyboard Command Action
Space bar Moves forward one screen
Return Scrolls one line at a time
b Moves back one screen
h Displays a help menu of features
/string Searches forward for pattern
n Finds the next occurrence of pattern
q Quits and returns to the shell prompt

more Command Examples

1. To browse the file:

# more file.txt

2. To display the prompt for continue:

# more -d file.txt 

3. To stop pausing when ^L (form feed) appears:

# more -l file.txt 

4. To specify “more” to count logically:

# more -f file.txt 

5. To not to scroll, instead clear screen and then display:

# more -p file.txt 

6. To not to scroll, instead print screen from top and then display:

# more -c file.txt 

7. To sqeeze multiple blank lines into one:

# more -s file.txt 

8. To suppress underlining:

# more -u file.txt 

9. To search for a string and then display:

# more +/sa file.txt 

10. Display the number of lines per screenful. The number argument is a positive decimal integer:

# more -n --lines 10 file.txt 

10. To start displaying file from specified line number:

# more +10 file.txt 

Filed Under: Linux

Some more articles you might also be interested in …

  1. info Command Examples
  2. fprintd-verify Command Examples in Linux
  3. terminator: command not found
  4. RedHat / CentOS : How to change currently active slave interface of bonding online
  5. blkid Command Examples in Linux
  6. Grsync: Graphical rsync backup tool in Ubuntu Linux
  7. ascii: command not found
  8. mountpoint: command not found
  9. feh: Lightweight image viewing utility
  10. iptables: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright