More Questions from Disk Operating System (DOS)

In MS-DOS, you want to display the contents of C:\AUTOEXEC.BAT but the output scrolls too fast. Which correct command paginates the output one screen at a time?

Computer Science Disk Operating System (DOS) Difficulty: Easy
Choose an option
  • A
    TYPE C:\AUTOEXEC.BAT | MORE
  • B
    TYPE C:\AUTOEXEC.BAT /P
  • C
    TYPE C:\AUTOEXEC.BAT/MORE
  • D
    TYPE C:\AUTOEXEC.BAT | PAUSE
  • E
    TYPE C:\AUTOEXEC.BAT | MORE.

Answer

Correct Answer: TYPE C:\AUTOEXEC.BAT | MORE

Explanation

Introduction / Context:Large text files printed to the screen with TYPE can scroll past the visible buffer. Piping output through a pager is a standard console technique to read content screen by screen, improving readability without editing the file.

Given Data / Assumptions:

  • The file C:\AUTOEXEC.BAT exists and is readable.
  • MS-DOS shell supports pipes and the MORE filter.
  • User wants interactive pagination.

Concept / Approach:The pipe character (|) connects the output of one command to the input of another. In DOS, piping TYPE into MORE paginates text by waiting for a keypress at each screenful. Slashes like /P are not valid for TYPE pagination (they are used by other commands), and adding stray punctuation (like a trailing dot) breaks the command.

Step-by-Step Solution:

1) Run: TYPE C:\AUTOEXEC.BAT | MORE2) Read the first screen of text; press a key to continue.3) Repeat until the end of file.4) Optionally redirect to a file or printer instead of paging if required.

Verification / Alternative check:Try TYPE C:\AUTOEXEC.BAT alone and observe rapid scrolling; then compare with the piped command to confirm pagination works.

Why Other Options Are Wrong:

  • TYPE ... /P or /MORE: TYPE does not support these switches for paging.
  • TYPE ... | PAUSE: Pauses once, not paginated viewing.
  • TYPE ... | MORE.: Trailing dot invalidates the pager command.

Common Pitfalls:Forgetting the space before and after the pipe or mis-typing the path, which leads to “File not found.”

Final Answer:TYPE C:\AUTOEXEC.BAT | MORE

Discussion & Comments
No comments yet. Be the first to comment!
Join Discussion