Interview Questions

Which two commands can you use to delete directories?

Operating System Interview Questions and Answers


(Continued from previous question...)

Which two commands can you use to delete directories?

Which two commands can you use to delete directories?
A) rm
B) rm -rf
C) rmdir
D) rd
E) rd -rf


Answer(s): B, C - You can use rmdir or rm -rf to delete a directory. Answer a is incorrect, because the rm command without any specific flags will not delete a directory, it will only delete files. Answers d and e point to a non-existent command.

(Continued on next question...)

Other Interview Questions