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.)
rm without any option (rm folder) is incapable of deleting a directory whether empty or full. rmdir folder will delete an empty directory and rm -r will delete a directory, empty or non-empty
B. rmdir Downloads
E. rm -r Downloads
To remove an empty directory, you can use the rmdir command (Option B). If the directory is not empty and you want to remove it along with its contents, you can use the rm -r command (Option E).
Options A, C, and D are not valid commands for removing directories.
If "Downloads" is empty, then why do we need to -r to remove sub-directories? If there are sub-directories, then it's not empty. If it's empty, then the original command shouldn't have failed?
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.)
correct answer is B, because assuming the Downloads directory is empty
answer E is related of below context:
But, how do you delete a full directory that has many files and sub-directories? The solutions is to pass the -rf option to the rm command
rm -r Downloads
rm -rf Downloads
so, my conclusion - must to be only answer B
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Jichz
Highly Voted 3 years, 5 months agoEricBStep
Highly Voted 1 year, 10 months agokuzummjakk
Most Recent 3 months, 3 weeks agoThuty07
5 months agoTeesplint
5 months, 1 week agoDanYendler2014
2 years agoboss_ROMD
2 years, 3 months agocapwan
2 years, 9 months agonikonik
2 years, 8 months agokimalto452
2 years, 4 months agokimalto452
2 years, 4 months agokimalto452
2 years, 4 months agokimalto452
2 years, 4 months agoartmimois
1 year, 6 months ago