Bird
0
0

What will be the output of the following commands sequence?

medium📝 Command Output Q13 of 15
Linux CLI - Navigating the File System
What will be the output of the following commands sequence?
cd /tmp
pwd
cd ..
pwd
A/tmp /
B/tmp /tmp
C/ /tmp
D/ /
Step-by-Step Solution
Solution:
  1. Step 1: Execute cd /tmp and pwd

    Changing directory to /tmp and printing working directory shows /tmp.
  2. Step 2: Execute cd .. and pwd

    Moving up one directory from /tmp goes to /. Printing working directory now shows /.
  3. Final Answer:

    /tmp / -> Option A
  4. Quick Check:

    cd /tmp then cd .. moves to root [OK]
Quick Trick: Remember: cd .. moves up one folder [OK]
Common Mistakes:
  • Thinking cd .. stays in the same folder
  • Confusing output order
  • Assuming pwd shows previous directory

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes