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

A.

rmdir '~/\dir'

B.

rmdir "~/\dir"

C.

rmdir ~/'dir'

D.

rmdir ~/\dir

E.

rmdir ~/\\dir

题解

「\」是转义字符,如果要跳脱「转义字符」,同样需要使用转义字符。因此选项 E 是正确答案。