Linux Essentials (010-160) — Question 19

Running the command rm Downloads leads to the following error: rm: cannot remove 'Downloads/': Is a directory
Which of the following commands can be used instead to remove Downloads, assuming Downloads is empty? (Choose two.)

Answer options

Correct answer: B, E

Explanation

The command rmdir Downloads is specifically designed to remove empty directories, making it a valid choice. Similarly, rm -r Downloads can remove directories recursively, including empty ones. The other options do not perform the required action for deleting a directory.