Multiple choice technology operating systems

Which command is used to delete all files in the current directory and all its sub-directories?

  1. go to particular directory and type rm -rf

  2. go to particular directory and type rm*

  3. go to particular directory and type rm -rf*

  4. go to particular directory and type *rm -rf

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

The command rm -rf * recursively (-r) and forcefully (-f) deletes all files and subdirectories matching the wildcard * in the current directory. Running rm -rf without a target or placing the wildcard before the command is syntactically invalid or ineffective.