Vidyalelo
Computer Science · Q45

Disk Operating System (DOS)

Engineering and GATE · Computer Science · question 45

Q45

DIR command is used to

A.
Display a list of files in a directory
Answer
B.
Display contents of files in directory
C.
Display type of files in a sub directory
D.
All of above

Answer: Option A

Solution

Answer: Option A
Solution:
In Disk Operating System (DOS), the DIR command is used to display a list of files in a directory. When you enter "dir" at the command prompt in DOS, it lists all the files and directories present in the current directory.

Option B, "Display contents of files in directory," is not correct. The DIR command does not display the contents of files; it only lists their names, sizes, and other details.
Option C, "Display type of files in a sub directory," is also not correct. The DIR command lists files and directories but does not categorize them by type within a subdirectory.

Therefore, the correct answer is Option A: Display a list of files in a directory.