What does the pwd command do?
2019
What does the pwd command do?
Answer: A. Write the full path name of the current working directory to the standard output. — ConceptA shell command performs a defined operating-system operation. The pwd utility reports the pathname of the process’s current working directory; it does…
- A.
Write the full path name of the current working directory to the standard output.
- B.
Reset the password of the console.
- C.
Remove all the passwords of the directory.
- D.
Create a new directory.
Show answer & explanation
Correct answer: A
Concept
A shell command performs a defined operating-system operation. The pwd utility reports the pathname of the process’s current working directory; it does not modify directories or credentials.
Application
Here the required behavior is to write the full pathname of the current working directory to standard output. That is precisely the operation performed by pwd.
Contrast
Writing the full pathname of the current working directory describes a directory-location query.
Resetting a console password describes credential administration.
Removing directory passwords describes credential deletion.
Creating a new directory describes a filesystem modification.
Cross-check
Running pwd in a shell displays the current directory path and leaves the filesystem and passwords unchanged.
Therefore, pwd writes the full pathname of the current working directory to standard output.