Bird
0
0

You run touch file1.txt file2.txt but only file1.txt is created. What is the likely cause?

medium📝 Debug Q6 of 15
Linux CLI - File and Directory Operations
You run touch file1.txt file2.txt but only file1.txt is created. What is the likely cause?
AYou used wrong syntax with commas
Btouch command only creates one file at a time
Cfile2.txt already exists and cannot be updated
DYou have write permission only in the directory for file1.txt
Step-by-Step Solution
Solution:
  1. Step 1: Analyze permission impact on touch

    touch requires write permission in the directory to create files. If permission is missing for file2.txt location, it won't create it.
  2. Step 2: Evaluate other options

    touch can create multiple files at once (B is wrong). Existing files can be updated (C wrong). No commas used in the command (A wrong).
  3. Final Answer:

    You have write permission only in the directory for file1.txt -> Option D
  4. Quick Check:

    Permission limits file creation = D [OK]
Quick Trick: Check directory write permissions if some files not created [OK]
Common Mistakes:
  • Believing touch creates only one file at a time
  • Assuming existing files cannot be updated
  • Using commas in file list

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes