Bird
0
0

You want to view a log file system.log but also want to search inside it while scrolling. Which command is best to use?

hard📝 Application Q15 of 15
Linux CLI - Viewing and Editing Files
You want to view a log file system.log but also want to search inside it while scrolling. Which command is best to use?
Amore system.log
Bless system.log
Ccat system.log
Dhead system.log
Step-by-Step Solution
Solution:
  1. Step 1: Identify commands that allow searching while viewing

    less supports searching inside the file while scrolling up and down.
  2. Step 2: Compare with other commands

    cat shows all content at once; more allows paging but limited searching; head shows only the first lines.
  3. Final Answer:

    less system.log -> Option B
  4. Quick Check:

    Use less for scrolling and searching [OK]
Quick Trick: Use less to scroll and search inside files [OK]
Common Mistakes:
MISTAKES
  • Using cat for long files
  • Choosing more which has limited search
  • Using head which shows only start

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes