Difficulty: Easy
Correct Answer: pg
Explanation:
Introduction / Context:
When working at a Unix or Linux terminal, long files can scroll off the screen quickly. Pagers are utilities that show content a screenful at a time. Historically, the pg command uses a default page size of 24 lines, which is why many textbooks reference “view 24 lines at a time.” Knowing which pager provides that default helps with day-to-day system administration and exam questions alike.
Given Data / Assumptions:
Concept / Approach:
Pagers offer interactive navigation. The pg utility (System V heritage) presents a file in 24-line chunks by default. It accepts navigation keystrokes (space to advance, q to quit). Other commands either do not paginate or are intended for different tasks (printing or raw output).
Step-by-Step Solution:
Verification / Alternative check:
Run pg /etc/services and press space to advance. You will see the content displayed page by page. For similar functionality with richer navigation, many modern systems use less, but the “24 lines” cue historically maps to pg.
Why Other Options Are Wrong:
Common Pitfalls:
Assuming all pagers behave identically. While more and less are common, certification-style questions often expect pg when “24 lines” is emphasized. Also remember that page length can be affected by terminal size settings and environment variables.
Final Answer:
pg
Discussion & Comments