When executing ls ../Documents/ from /home/user/Downloads/, which directory's content is displayed?

Prepare for the LPI Linux Essentials 010-160 Test. Study with flashcards and multiple choice questions, each question offers hints and explanations. Get ready to ace your exam!

When executing the command ls ../Documents/ from the current directory /home/user/Downloads/, the system interprets the .. notation as moving one directory up in the hierarchy, which takes the user from /home/user/Downloads/ to /home/user/. From that point, the command specifies to look for the Documents directory that exists directly within /home/user/.

Thus, the command effectively lists the contents of /home/user/Documents/. This is why the correct answer is indeed that the content of the /home/user/Documents/ directory is displayed. The ls command is simply used to list files and directories, and since the path provided after ls is relative to where the command is executed, it correctly points to the intended directory following standard path resolution rules in the file system.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy