Bird
0
0

Which command will create three empty files named a.txt, b.txt, and c.txt in one line using a single touch command?

easy📝 Conceptual Q2 of 15
Linux CLI - File and Directory Operations
Which command will create three empty files named a.txt, b.txt, and c.txt in one line using a single touch command?
Atouch a.txt; touch b.txt; touch c.txt
Btouch a.txt b.txt c.txt
Ctouch a.txt,b.txt,c.txt
Dtouch -n a.txt b.txt c.txt
Step-by-Step Solution
Solution:
  1. Step 1: Identify correct syntax for multiple files with touch

    The touch command accepts multiple filenames separated by spaces to create or update them in one command.
  2. Step 2: Evaluate options

    touch a.txt b.txt c.txt uses spaces correctly. touch a.txt; touch b.txt; touch c.txt uses multiple commands. touch a.txt,b.txt,c.txt uses commas which is invalid. touch -n a.txt b.txt c.txt uses a non-existent -n option.
  3. Final Answer:

    touch a.txt b.txt c.txt -> Option B
  4. Quick Check:

    touch multiple files space-separated = A [OK]
Quick Trick: Use spaces to list multiple files with touch [OK]
Common Mistakes:
MISTAKES
  • Using commas instead of spaces
  • Trying unsupported options like -n
  • Running multiple touch commands instead of one

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes