A user is currently in the directory /home/user/Downloads/ and runs the command ls ../Documents/ Assuming it exists, which directory's content is displayed?
The ls command is used to list the contents of a directory. When run with the argument ../Documents/, it will list the contents of the Documents directory that is located one level up from the current directory /home/user/Downloads/.
Therefore, if the Documents directory exists in /home/user/, then option A, /home/user/Documents/, is the correct answer.
A is correct.
The ".." changes into the child directory (i.e. /home/user), so "../Documents/" would list the contents of the /home/user/Documents directory.
It seems to be an almost interpretive question. Looking at strict notation the "/Documents/", D, answer would indicate a root level directory called "Documents" as there are NO preceding characters indicating it is a subdirectory. Like missing context in a text message.
So this is a dumb question, really. /home/user/Documents and /Documents/ (assuming its a directory in the same location one up from /Downloads/) is the same location, no doubt about it.
However, the question asks about a directory's contents specifically. Technically, A. is a path, not a directory. D would be right if we take this into consideration, but in real life A and D would get you what you wanted.
This section is not available anymore. Please use the main Exam Page.010-160 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
jezd
Highly Voted 4 years, 7 months agoharrymadgun
Highly Voted 4 years, 10 months agoVslaugh
Most Recent 6 months, 2 weeks agoAndrewGrasso
1 year, 2 months agoflavioamorim
1 year, 3 months agojosephrming
1 year, 6 months agosupergq
1 year, 7 months agoDever24
1 year, 10 months agomiurach
1 year, 11 months agoNess12
2 years, 1 month agoKITELinz
2 years, 3 months agohughesd010
2 years, 4 months agoDor15
2 years, 8 months agoTanchwa
2 years, 9 months agoMiragico
2 years, 9 months agostressedout7
2 years, 9 months agoshosha
2 years, 11 months ago