Bird
0
0

Identify the error in this command sequence:

medium📝 Debug Q6 of 15
Linux CLI - Linux Basics and Terminal
Identify the error in this command sequence:
cd newfolder
touch file.txt
Acd command should be 'cd ./newfolder'
Btouch command syntax is wrong
Cnewfolder does not exist, so cd fails
DNo error, commands are correct
Step-by-Step Solution
Solution:
  1. Step 1: Check if 'newfolder' exists

    If newfolder does not exist, cd newfolder will fail with an error.
  2. Step 2: Verify touch command

    touch file.txt is correct syntax, so no error here.
  3. Final Answer:

    newfolder does not exist, so cd fails -> Option C
  4. Quick Check:

    cd to non-existent folder causes error [OK]
Quick Trick: Ensure directory exists before using 'cd' [OK]
Common Mistakes:
  • Assuming touch syntax error
  • Thinking cd needs './' prefix
  • Ignoring missing directory error

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes