Bird
0
0

If your current directory is /home/user, what is the full absolute path of ../documents/report.txt?

medium📝 Command Output Q13 of 15
Linux CLI - Navigating the File System
If your current directory is /home/user, what is the full absolute path of ../documents/report.txt?
A<code>/documents/report.txt</code>
B<code>/home/user/documents/report.txt</code>
C<code>/home/documents/report.txt</code>
D<code>/home/user/../documents/report.txt</code>
Step-by-Step Solution
Solution:
  1. Step 1: Understand .. in relative paths

    .. means move one directory up from current directory. From /home/user, going up one level is /home.
  2. Step 2: Append the rest of the path

    After moving up, append documents/report.txt to get /home/documents/report.txt.
  3. Final Answer:

    /home/documents/report.txt -> Option C
  4. Quick Check:

    .. moves up one folder = /home/documents/report.txt [OK]
Quick Trick: .. means go up one folder from current directory [OK]
Common Mistakes:
MISTAKES
  • Not moving up directory with ..
  • Confusing relative and absolute paths
  • Leaving .. in the final path

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes