Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.
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.
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, 1 month agoharrymadgun
Highly Voted 4 years, 5 months agoVslaugh
Most Recent 1 month agoAndrewGrasso
8 months, 2 weeks agoflavioamorim
10 months agojosephrming
1 year, 1 month agosupergq
1 year, 2 months agoDever24
1 year, 4 months agomiurach
1 year, 5 months agoNess12
1 year, 7 months agoKITELinz
1 year, 10 months agohughesd010
1 year, 11 months agoDor15
2 years, 2 months agoTanchwa
2 years, 4 months agoMiragico
2 years, 4 months agostressedout7
2 years, 4 months agoshosha
2 years, 5 months ago