Bird
0
0

Why does touch not change the content of an existing file when updating timestamps?

hard📝 Conceptual Q10 of 15
Linux CLI - File and Directory Operations
Why does touch not change the content of an existing file when updating timestamps?
ABecause touch deletes and recreates the file silently
BBecause touch locks the file to prevent changes
CBecause touch copies the file before updating
DBecause touch only modifies file metadata, not file data
Step-by-Step Solution
Solution:
  1. Step 1: Understand what touch modifies

    touch updates the file's access and modification timestamps, which are metadata, not the file's actual content.
  2. Step 2: Evaluate other options

    touch does not lock, copy, or delete files when updating timestamps.
  3. Final Answer:

    Because touch only modifies file metadata, not file data -> Option D
  4. Quick Check:

    touch changes metadata only = D [OK]
Quick Trick: touch updates metadata timestamps, leaves content intact [OK]
Common Mistakes:
  • Thinking touch locks or copies files
  • Believing touch deletes files
  • Assuming content changes on touch

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes