[Ilugc] One Day One GNU/Linux Command (MORE)

  • From: girishvenkatachalam@xxxxxxxxx (Girish Venkatachalam)
  • Date: Tue Jun 3 13:19:44 2008

On 09:57:27 Jun 03, Bharathi Subramanian wrote:

One Day One GNU/Linux Command 
=============================

more -- File perusal filter for viewing

Summary: 

Perusal means the act of reading, especially of reading through or
with care.  More is a filter for paging through text one screenful
at a time. Press `q' to Quit.

Examples:

$ more myfile1 myfile2 -- Show myfile 1 and 2  page by page.

$ more -10 myfile -- Show 10 lines/page.

$ more -d myfile -- Usually more show % of viewed content only at the 
                    bottom. With -d it shows more verbose prompt.

$ more -p -10 myfile -- Don't scroll the output. Just the screen and 
                        display the text.

$ more -c -10 myfile -- Don't scroll.  Instead, paint each screen from
      the top, clearing the remainder of each line as it is displayed.

$ more -s myfile -- Squeeze multiple blank lines into one.

$ more +/Midas myfile -- The +/ option specifies a string that will be 
                         searched for before each file is displayed.

$ more +10 myfile -- Start at line number 10.

$ ls | more -- Show the ls output page by page.

Apart from this command line options, more supports few interactive
commands also. For example

:f -- Show current line number and filename
:n -- Next file
:p -- Previous file

b -- Move Backward
f -- Move Forward
h -- Help
q -- Quit

Space -- Next Page
ENTER -- Next Line

Read: man more

Hey,

People should not be using more(1) any"more". ;)

It is less and less nowadays.

And now that summer is getting over let us switch over from 'more' to
'chai'. (If you dunno Tamil you won't get this joke)

Anyway kidding aside less(1) is much faster and more feature rich than
more. Since it doesn't read the whole file before loading.

Try loading a file in vi/vim and less. Try the log file for instance and
contrast it with the startup time with more.

Not sure if more has backported some of less innovations.

I stopped using more(1) more than 6 years ago.

It can also display percentages, move back one page, half page or few
lines at a time , turn pattern based search on and off and so on.

It is only the really really old UNIX hackers that still are stuck with
more(1).

Anyway enough of my rant.

-Girish

Other related posts: