Moderate

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

Correct answer: B. rm -r *

  • A. rm *
  • B. rm -r *
  • C. rm all
  • D. rm *.*

Explanation

`rm -r *` recursively removes the non-hidden entries in the current directory, including their files and subdirectories. Plain `rm *` does not remove directories because it lacks the recursive option.

Last updated

Practise Software Development Lifecycle

423 free Software Development Lifecycle MCQs from Software Engineering, each with the correct answer and an explanation. Unlimited attempts, no account needed.

Exams that ask Software Engineering questions like this

Software Engineering is on this paper prepared for on TestUstad, and all of them draw the same bank, so this question is worth knowing for it.

Related questions