Bird
0
0

Given the current directory is /home/user, what is the absolute path of the relative path ../../etc/passwd?

medium📝 Command Output Q5 of 15
Linux CLI - Navigating the File System
Given the current directory is /home/user, what is the absolute path of the relative path ../../etc/passwd?
A/etc/passwd
B/home/etc/passwd
C/home/user/etc/passwd
D/user/etc/passwd
Step-by-Step Solution
Solution:
  1. Step 1: Analyze relative path with '..'

    Each '..' moves up one directory. From /home/user, two '..' moves up to root '/'.
  2. Step 2: Append remaining path

    After moving up to '/', append 'etc/passwd' to get '/etc/passwd'.
  3. Final Answer:

    /etc/passwd -> Option A
  4. Quick Check:

    '../../etc/passwd' from /home/user = /etc/passwd [OK]
Quick Trick: Two '..' from /home/user goes to root '/' [OK]
Common Mistakes:
  • Stopping at /home instead of root
  • Appending relative path incorrectly
  • Confusing directory levels

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes