Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Cisco 200-901 Exam - Topic 2 Question 104 Discussion

The project is migrated to a new codebase, the ''old_project'' directory must be deleted. The directory has multiple read-only files, and it must be deleted recursively without prompting for confirmation. Which bash command must be used?
A) rm -rf old_project
B) rm -r old_project
C) rmdir -p old_project
D) rmdir old_project

Cisco 200-901 Exam - Topic 2 Question 104 Discussion

Actual exam question for Cisco's 200-901 exam
Question #: 104
Topic #: 2
[All 200-901 Questions]

The project is migrated to a new codebase, the ''old_project'' directory must be deleted. The directory has multiple read-only files, and it must be deleted recursively without prompting for confirmation. Which bash command must be used?

Show Suggested Answer Hide Answer
Suggested Answer: A

To delete a directory and all of its contents (including read-only files) recursively without prompting for confirmation, the rm command with the -rf flags should be used.

rm -r: This option tells rm to remove directories and their contents recursively.

rm -f: This option tells rm to force the removal of files, ignoring nonexistent files and never prompting for confirmation.

Therefore, the correct command is rm -rf old_project. This command will recursively remove the old_project directory and all its contents without any confirmation prompts, regardless of file permissions.


Topic 2, Exam Pool B

Contribute your Thoughts:

0/2000 characters
Maryanne
5 months ago
I agree, A is the command we need. No prompts, just delete!
upvoted 0 times
...
Percy
5 months ago
C) and D) won't work for directories with files. A is the best choice.
upvoted 0 times
...
Miesha
5 months ago
A) is the only option that works for read-only files.
upvoted 0 times
...
Shaun
5 months ago
I feel like B) is safer, but it won't handle read-only files.
upvoted 0 times
...
Galen
5 months ago
Definitely A. The recursive flag is crucial here.
upvoted 0 times
...
Corazon
5 months ago
I think it's A) rm -rf old_project. It deletes everything without asking.
upvoted 0 times
...
Trinidad
6 months ago
I thought rmdir was for empty directories only?
upvoted 0 times
...
Malika
6 months ago
Wait, are you sure that's safe?
upvoted 0 times
...
Patti
6 months ago
Agreed, no confirmation needed for that!
upvoted 0 times
...
Arlene
7 months ago
It's definitely A) rm -rf old_project.
upvoted 0 times
...
Kirk
7 months ago
A) rm -rf old_project? More like A) rm -rf my_career if I mess this up!
upvoted 0 times
...
Wai
7 months ago
A is the obvious choice. I mean, who has time to deal with read-only files these days? Just blast it away!
upvoted 0 times
...
Lynelle
7 months ago
Option A is the way to go. Who needs confirmation anyway? Just nuke that directory!
upvoted 0 times
...
Pansy
7 months ago
I agree, A is the way to go. Deleting read-only files can be a pain, but -rf gets the job done.
upvoted 0 times
...
Francesco
7 months ago
I feel like "rm -rf" is definitely the way to go for this scenario, but I just hope I don't mix it up with "rmdir" again!
upvoted 0 times
...
Leoma
8 months ago
I practiced a similar question where we had to delete a directory with files, and I chose "rm -r" but I think we need the "-f" here too.
upvoted 0 times
...
Thersa
8 months ago
I'm not entirely sure, but I remember something about "rmdir" only working for empty directories. That makes me lean towards option A as well.
upvoted 0 times
...
Annita
8 months ago
A seems like the best option. The 'rm -rf' command is the safest way to delete the directory without any issues.
upvoted 0 times
...
Isabella
8 months ago
I'm pretty confident that A is the correct answer. The 'rm -rf' command is the standard way to delete a directory and its contents recursively without prompting.
upvoted 0 times
...
Lenna
8 months ago
Definitely go with A. 'rm -rf' is the way to go when you need to delete a directory and all its contents, no matter the file permissions.
upvoted 0 times
...
Lucina
9 months ago
I think the command we need is the one that includes the "-f" option to force deletion, right? So maybe it's A?
upvoted 0 times
...
Kris
9 months ago
A) rm -rf old_project is the correct answer. It will recursively delete the directory and all its contents without prompting for confirmation.
upvoted 0 times
...
Devora
9 months ago
A is the only way to go for recursive deletion.
upvoted 0 times
...
Raymon
9 months ago
Hmm, I'm a bit confused. Isn't 'rmdir' only for empty directories? I'm not sure if that would work for a directory with files.
upvoted 0 times
...
Junita
10 months ago
I think the answer is A. The 'rm -rf' command will recursively delete the directory and all its contents, even if they are read-only.
upvoted 0 times
Evangelina
4 months ago
Just be careful with it, it’s powerful!
upvoted 0 times
...
Brandon
4 months ago
I’ve used that command many times, it works perfectly.
upvoted 0 times
...
Jillian
4 months ago
No doubt about it, A handles read-only files too.
upvoted 0 times
...
Chaya
8 months ago
Yeah, 'rm -rf' is the way to go for this.
upvoted 0 times
...
Leah
9 months ago
I agree, A is definitely the right choice.
upvoted 0 times
...
...

Save Cancel