ArticleslgStudy

computer science

More (command)

More (command) is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand More (command) rather than just read about it. In short: In computing, more is a command to view (but not modify) the contents of a text file one screen at a time. It is available on Unix and Unix-like systems, MS-DOS, Digital Research FlexOS, IBM/Toshiba 4690 OS, IBM OS/2, Windows and ReactOS.

More (command) — main illustration
More (command) — illustration

Key takeaways

  • More (command) belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect More (command) to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of More (command) from memory before moving on to harder problems.

Reference excerpt

In computing, more is a command to view (but not modify) the contents of a text file one screen at a time. It is available on Unix and Unix-like systems, MS-DOS, Digital Research FlexOS, IBM/Toshiba 4690 OS, IBM OS/2, Windows and ReactOS. Programs of this sort are called pagers. more is a very basic pager, originally allowing only forward navigation through a file, though newer implementations do allow for limited backward movement.

History The more command was originally written by Daniel Halbert, a graduate student at the University of California, Berkeley, in 1978. It was later expanded on by Eric Shienbrood, Geoff Peck (added underlining, single spacing) and John Foderaro (added -c, more environment variable history). It was first included in 3.0 BSD, and has since become a standard program in all Unix systems. less, a similar command with the extended capability of allowing both forward and backward navigation through the file, was written by Mark Nudelman between 1983 and 1985 and is now included in most Unix and Unix-like systems. The command is available in MS-DOS versions 2 and later. A more command is also part of ASCII's MSX-DOS2 Tools for MSX-DOS version 2. The Software Link's PC-MOS includes an implementation of more. Like the rest of the operating system, it is licensed under the GPL v3. The FreeDOS version was developed by Jim Hall and is licensed under the GPL v2. The command is also available in the KolibriOS Shell. The numerical computing environments MATLAB and GNU Octave include a more function that turns output pagination on or off.

Usage

Unix-like The command-syntax is:

more [options] [file_name]

If no file name is provided, more looks for input from standard input. Once more has obtained input, it displays as much as can fit on the current screen and waits for user input to advance, with the exception that a form feed (^L) will also cause more to wait at that line, regardless of the amount of text on the screen. In the lower-left corner of the screen is displayed the text "--More--" and a percentage, representing the percent of the file that more has paged through. (This percentage includes the text displayed on the current screen.) When more reaches the end of a file (100%) it exits. The most common methods of navigating through a file are ↵ Enter, which advances the output by one line, and Space, which advances the output by one screen. There are also other commands that can be used while navigating through the document; consult more's man page for more details.

Options Options are typically entered before the file name, but can also be entered in the environment variable $MORE. Options entered in the actual command line will override those entered in the $MORE environment variable. Available options may vary between Unix systems, but a typical set of options is as follows:

-num: This option specifies an integer which is the screen size (in lines). -d: more will prompt the user with the message [Press space to continue, 'q' to quit.] and will display [Press 'h' for instructions.] instead of ringing the bell when an illegal key is pressed. -l: more usually treats ^L (form feed) as a special character, and will pause after any line that contains a form feed. The -l option will prevent this behavior. -f: Causes more to count logical, rather than screen lines (i.e., long lines are not folded). -p: Do not scroll. Instead, clear the whole screen and then display the text. -c: Do not scroll. Instead, paint each screen from the top, clearing the remainder of each line as it is displayed. -s: Squeeze multiple blank lines into one. -u: Backspaces and carriage returns to be treated as printable characters; +/: This option specifies a string that will be searched for before each file is displayed. (Ex.: more +/Preamble gpl.txt) +num: Start at line number num.

Microsoft Windows and ReactOS

The command-syntax is:

command | more [/c] [/p] [/s] [/tn] [+n] more [[/c] [/p] [/s] [/tn] [+n]] < [Drive:] [Path] FileName more [/c] [/p] [/s] [/tn] [+n] [files]

Examples To display the file named letter.txt on the screen, the user can type either of the following two commands:

more letter.txt type letter.txt | more

The command displays the first screen of information from letter.txt, and then the following prompt appears:

-- More—When the spacebar is pressed, the next screen of information will be displayed.

It is also possible to clear the screen and remove all extra blank lines before displaying the file:

more /c /s < letter.txt type letter.txt | more /c /s

IBM OS/2 The command-syntax is:

MORE < [drive:][path]filename command | more

drive:\path\filename – Specifies the location of the file to display one screen at a time. command | – Specifies the command whose output will be displayed.

Example Return the content of the OS/2 system directory using the dir command and display it one screen at a time using the more command:

See also pg (Unix) less (Unix) most (Unix)

References

Further reading Cooper, Jim (2001). Special Edition Using MS-DOS 6.22, Third Edition. Que Publishing. ISBN 978-0789725738. Kathy Ivens; Brian Proffit (1993). OS/2 Inside & Out. Osborne McGraw-Hill. ISBN 978-0078818714. Stanek, William R. (2008). Windows Command-Line Administrator's Pocket Consultant, 2nd Edition. Microsoft Press. ISBN 978-0735622623. McElhearn, Kirk (2006). The Mac OS X Command Line: Unix Under the Hood. John Wiley & Sons. ISBN 978-0470113851.

External links

"FOLDOC entry for pager"; see definition #2. manpage of more more | Microsoft Docs Open source MORE implementation that comes with MS-DOS v2.0 https://www.question-defense.com/documentation/linux-manpages/more Archived 2020-06-10 at the Wayback Machine

Illustrations

More (command) illustration
More (command): The ReactOS more command
The ReactOS more command

Worked examples

Example 1 — a first encounter with More (command)

Start with the simplest possible case. Write down what More (command) claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to More (command) before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about More (command) ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of More (command)

In research
More (command) appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses More (command) in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
More (command) is common in secondary-school and first-year university syllabi. It links to neighbouring topics External DOS commands, Microsoft free software, OS/2 commands, so understanding it makes those chapters shorter.
In everyday life
Look for More (command) outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “More (command)” →

How to study More (command) in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what More (command) means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain More (command) out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is More (command) in simple terms?

In computing, more is a command to view (but not modify) the contents of a text file one screen at a time. It is available on Unix and Unix-like systems, MS-DOS, Digital Research FlexOS, IBM/Toshiba 4690 OS, IBM OS/2, Windows and ReactOS.

Why does More (command) matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study More (command)?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on More (command).

Tags

  • External DOS commands
  • Microsoft free software
  • OS/2 commands
  • ReactOS commands
  • Standard Unix programs
  • Terminal pagers
  • Unix SUS2008 utilities
  • Windows administration
  • Windows commands

Keep exploring