132k views
1 vote
Below is an illustration of information you displayed by entering a command at the root command prompt. Which of the following commands displayed this information?

a) ls -l
b) cd ..
c) pwd
d) cat file.txty6

User Alterlife
by
6.6k points

2 Answers

3 votes

Final answer:

The correct command for displaying the current directory is c) pwd, which stands for 'print working directory'.

Step-by-step explanation:

The command that would display the current directory you are in when entered at the root command prompt is c) pwd. The pwd command stands for 'print working directory' and it outputs the absolute path of the current working directory to the screen. This is a fundamental command in UNIX and UNIX-like operating systems, including Linux and MacOS.

The other commands listed have different functions: a) ls -l lists files in the current directory in a long format; b) cd .. changes the directory to the parent directory; d) cat file.txt displays the contents of a file called file.txt.

User Xrfang
by
7.9k points
6 votes

Final answer:

The correct command that displays the current directory information at a root command prompt is 'pwd'. This command is used in a Unix/Linux environment.

Step-by-step explanation:

The question asks about an information displayed at a root command prompt and seeks the command that produced it. Based on the information provided, the correct answer is c) pwd. The pwd (print working directory) command in a Unix/Linux environment displays the current directory that the user is in. The other options given are incorrect: a) ls -l lists files in long format, b) cd .. changes the directory to the parent directory, and d) cat file.txt displays the content of the file named file.txt.

User Tanjima Kothiya
by
7.4k points