Question 200
A shell prompt is customized and the operator needs the full current working directory path. One student proposes Run pwd and another proposes Run ls -ld /var/log. Which technical comparison is the soundest?
Explanation
Correct Answer
Correct distinction: Run pwd targets current directory path; pwd prints the present working directory. The compared alternative instead serves directory entries themselves.
Incorrect Answers
Incorrect mapping: Run ls -ld /var/log is used for directory entries themselves. It does not displace Run pwd for the described requirement.
The mechanisms are different: pwd prints the present working directory. By contrast, The -d option lists the directory entry itself and -l includes its metadata. They are not universally interchangeable.
The third option addresses parent directory navigation: The .. component denotes the parent directory relative to the current location. The original action remains relevant because pwd prints the present working directory.