Multiple choice technology operating systems

What will the following command do where foo and foo1 are both directories? rm ./foo ./foo/foo1

  1. Delete foo

  2. Delete foo and foo1

  3. Produce an error

  4. None of the above

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Executing rm on directories without the recursive flag (-r or -R) produces an error ('is a directory'). Because foo and foo1 are both directories, the rm command will fail to delete either and output error messages.