Bird
0
0

What will be the output after running these commands?

medium📝 Command Output Q4 of 15
Linux CLI - Navigating the File System
What will be the output after running these commands?
cd /var/log
pwd
A/var/log
B/log/var
C/var
D/home/user
Step-by-Step Solution
Solution:
  1. Step 1: Analyze the cd command

    "cd /var/log" moves to the folder /var/log exactly.
  2. Step 2: Analyze the pwd command

    "pwd" prints the current directory, which is now /var/log.
  3. Final Answer:

    /var/log -> Option A
  4. Quick Check:

    Output of cd /var/log + pwd = /var/log [OK]
Quick Trick: pwd shows the exact current folder path [OK]
Common Mistakes:
  • Mixing folder order in path
  • Assuming pwd shows home folder always

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes