What command is used to list contents of directories? A. tar B. dir C. lp D. ls E. None of the above

[amp_mcq option1=”tar” option2=”dir” option3=”lp” option4=”ls E. None of the above” correct=”option4″]

The correct answer is D. ls.

The ls command is used to list the contents of a directory. It can also be used to list the contents of a file.

The tar command is used to create and extract archives.

The dir command is used to list the contents of a directory on a Windows system.

The lp command is used to print a file.

None of the above is the correct answer.