Bird
0
0

What does the touch command do in Linux?

easy📝 Conceptual Q11 of 15
Linux CLI - File and Directory Operations
What does the touch command do in Linux?
ACopies a file to another location
BDeletes a file permanently
CCreates an empty file or updates the timestamp of an existing file
DDisplays the contents of a file
Step-by-Step Solution
Solution:
  1. Step 1: Understand the purpose of touch

    The touch command is used to create empty files or update the modification time of existing files.
  2. Step 2: Compare with other commands

    Deleting files is done with rm, copying with cp, and displaying contents with cat. None of these are touch.
  3. Final Answer:

    Creates an empty file or updates the timestamp of an existing file -> Option C
  4. Quick Check:

    touch = create/update file time [OK]
Quick Trick: Remember: touch makes or updates files fast [OK]
Common Mistakes:
MISTAKES
  • Confusing touch with delete or copy commands
  • Thinking touch shows file content
  • Assuming touch edits file content

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes