Wednesday 16, Apr 2025
We are moved to new domain
Click -> www.ehowtonow.com
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

Shop and help us

Flipkart Offer Snapdeal offer Amazon.in offer Amazon.com offer

Related Posts:

  • Delete the directories - rmdir Linux command rmdir rmdir [options] directories Delete the named directories (not the contents). directories are deleted from the parent directory and must be empty (if not, rm -r can be used instead). See also mkdir. Options --help Pr… Read More
  • Set or display host name - hostname Linux Command hostname hostname [option] [nameofhost] Description Set or display name of current host system. A privileged user can set the hostname with the nameofhost argument. Options -a, --alias Display the alias name of the host … Read More
  • host Linux Command host host [options] name [server] Description System administration command. Print information about hosts or zones in DNS. Hosts may be IP addresses or hostnames; host converts IP addresses to hostnames by default and ap… Read More
  • Delete file - rm Linux command rm rm [options] files Description Delete one or more files. To remove a file, you must have write permission in the directory that contains the file, but you need not have permission on the file itself. If you do not have… Read More
  • tar Linux Command tar tar [options] [tarfile] [other-files] Description Copy files to or restore files from an archive medium. If any files are directories, tar acts on the entire subtree. Options need not be preceded by - (though they may… Read More
  • 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: eHowToNow