Linux Foundation Certified System Administrator (LFCS) — Question 36

A user accidentally created the subdirectory \dir in his home directory. Which of the following commands will remove that directory?

Answer options

Correct answer: D

Explanation

The correct answer is D because it accurately specifies the directory path with the correct escape for the backslash. Option A and B have incorrect use of quotes and escaping, while option C refers to 'dir' instead of '\dir', and option E incorrectly uses double backslashes.