728x90 AdSpace

Wednesday, 12 July 2017

more - Display the named files on a terminal Linux Command

more

more [options] [files]

Description

Display the named files on a terminal, one screenful at a time. See less for an alternative to more.

Options

+num
Begin displaying at line number num.

-num number
Set screen size to number lines.

+/pattern
Begin displaying two lines before pattern.

-c
Repaint screen from top instead of scrolling.

-d
Display the prompt "[Press space to continue, `q' to quit] " instead of ringing the bell. Also display "[Press `h' for instructions] " in response to illegal commands.

-f
Count logical rather than screen lines. Useful when long lines wrap past the width of the screen.

-l
Ignore form-feed (Ctrl-L) characters.

-p
Page through the file by clearing each window instead of scrolling. This is sometimes faster.

-s
Squeeze; display multiple blank lines as one.

-u
Suppress underline characters.

Commands

All commands in more are based on vi commands. You can specify a number before many commands to have them executed multiple times. For instance, 3:p causes more to skip back three files, the same as issuing :p three times. The optional number is indicated by num in the following list.

SPACE
Display next screen of text.

z
Display next num lines of text, and redefine a screenful to num lines. Default is one screenful.

RETURN
Display next num lines of text, and redefine a screenful to num lines. Default is one line.

d,^D
Scroll num lines of text, and redefine scroll size to num lines. Default is one line.

q,Q,INTERRUPT
Quit.

s
Skip next num lines of text. Default is one line.

f
Skip forward num screens of text. Default is one screen.

b,^B
Skip backward num screens of text. Default is one screen. Does not work on pipes.

'
Return to point where previous search began.

=
Print number of current line.

/pattern
Search for pattern, skipping to numth occurrence if an argument is specified.

?, h
Display a summary of commands.

n
Repeat last search, skipping to numth occurrence if an argument is specified.

!cmd, :!cmd
Invoke shell and execute cmd in it.

v
Invoke an editor on the file at the current line. Use the editor in the environment variable VISUAL if defined, or EDITOR if that is defined; otherwise, default to vi.

^L
Redraw screen.

:n
Skip to next file, or numth file if an argument is specified.

:p
Skip to previous file, or numth previous if an argument is specified.

:f
Print current filename and line number.

.
Re-execute previous command.

Examples


Page through file in "clear" mode, and display prompts:

more -cd file

Format doc to the screen, removing underlines:

nroff doc| more -u

View the manpage for the more command; begin at the first appearance of the word "scroll":

man more|more +/scroll

Reference : http://www.linuxdevcenter.com
Annamalai Thangaraj

Annamalai is working as Technical Lead in Leading Telecom company with 5+ years experience in Identity and Access Management , Telecom and Networks, BigData, Java, Spring, Struts, Hibernate, AngularJS, and Enterprise Web Application Development.

Website: Java Tutorials Corner

Shop and help us

Flipkart Offer Snapdeal offer Amazon.in offer Amazon.com offer
  • Blogger Comments
  • Facebook Comments
  • Disqus Comments

0 comments:

Post a Comment

Item Reviewed: more - Display the named files on a terminal Linux Command Rating: 5 Reviewed By: Annamalai Thangaraj