Bird
0
0

What does the diff command do in Linux?

easy📝 Conceptual Q11 of 15
Linux CLI - Viewing and Editing Files
What does the diff command do in Linux?
AIt copies files from one directory to another.
BIt deletes duplicate files automatically.
CIt merges two files into one.
DIt compares two files line by line and shows differences.
Step-by-Step Solution
Solution:
  1. Step 1: Understand the purpose of diff

    The diff command is used to compare files line by line.
  2. Step 2: Identify what diff outputs

    It shows the differences between two files, not deleting, merging, or copying.
  3. Final Answer:

    It compares two files line by line and shows differences. -> Option D
  4. Quick Check:

    diff compares files [OK]
Quick Trick: Remember: diff shows differences, it does not merge or delete [OK]
Common Mistakes:
MISTAKES
  • Thinking diff merges files
  • Confusing diff with copy or delete commands
  • Assuming diff modifies files

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes