Bird
0
0

If your current directory is /home/user, which path correctly refers to the file notes.txt inside the documents folder within your home directory using a relative path?

easy📝 Conceptual Q2 of 15
Linux CLI - Navigating the File System
If your current directory is /home/user, which path correctly refers to the file notes.txt inside the documents folder within your home directory using a relative path?
A~/documents/notes.txt
B/documents/notes.txt
C../documents/notes.txt
D./documents/notes.txt
Step-by-Step Solution
Solution:
  1. Step 1: Identify current directory and target file location

    Current directory is /home/user, and documents is inside it.
  2. Step 2: Understand relative path usage

    Relative path './documents/notes.txt' means inside current directory's documents folder.
  3. Final Answer:

    ./documents/notes.txt -> Option D
  4. Quick Check:

    Relative path inside current dir = './folder/file' [OK]
Quick Trick: Use './' to start relative paths from current directory [OK]
Common Mistakes:
  • Using '/' which is absolute path
  • Using '..' which goes up one directory
  • Using '~' which is home but not relative

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes