Bird
0
0

What will be the output of ls ~/../ if your home directory is /home/bob?

medium📝 Command Output Q5 of 15
Linux CLI - Navigating the File System
What will be the output of ls ~/../ if your home directory is /home/bob?
ALists contents of /home
BLists contents of /home/bob
CLists contents of /
DError: directory not found
Step-by-Step Solution
Solution:
  1. Step 1: Understand the path ~/../

    The ~ expands to /home/bob. Adding /../ moves one directory up to /home.
  2. Step 2: Determine what ls ~/../ lists

    The command lists the contents of /home, the parent directory of the home folder.
  3. Final Answer:

    Lists contents of /home -> Option A
  4. Quick Check:

    ~/../ = parent of home directory [OK]
Quick Trick: ~/../ goes one level above your home folder [OK]
Common Mistakes:
  • Thinking it lists home directory itself
  • Expecting root directory contents
  • Assuming error due to ../ usage

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes