exam questions

Exam 010-160 All Questions

View all questions & answers for the 010-160 exam

Exam 010-160 topic 1 question 35 discussion

Actual exam question from LPI's 010-160
Question #: 35
Topic #: 1
[All 010-160 Questions]

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.)

  • A. undir Downloads
  • B. rmdir Downloads
  • C. dir -r Downloads
  • D. rem Downloads
  • E. rm -r Downloads
Show Suggested Answer Hide Answer
Suggested Answer: BE 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Jichz
Highly Voted 3 years, 5 months ago
B & E but the correct sentence in E is: rm -r Downloads
upvoted 23 times
...
EricBStep
Highly Voted 1 year, 10 months ago
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
upvoted 7 times
...
kuzummjakk
Most Recent 3 months, 3 weeks ago
Correction: B is wrong. Try it on a terminal.
upvoted 1 times
...
Thuty07
5 months ago
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.
upvoted 1 times
...
Teesplint
5 months, 1 week ago
Selected Answer: E
The only correct option is E. rmdir will only delete an empty directory. rm -r will delete the folder together with it's content
upvoted 1 times
...
DanYendler2014
2 years ago
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?
upvoted 2 times
...
boss_ROMD
2 years, 3 months ago
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
upvoted 1 times
...
capwan
2 years, 9 months ago
B is not correct.Because "rmdir" delete only empty directories.
upvoted 2 times
nikonik
2 years, 8 months ago
Wich of the following commands can be used instead to remove Downloads, assuming Downloads is empty?
upvoted 4 times
kimalto452
2 years, 4 months ago
assuming Downloads is empty?
upvoted 1 times
kimalto452
2 years, 4 months ago
Downloads is empty?
upvoted 1 times
kimalto452
2 years, 4 months ago
is empty?
upvoted 1 times
kimalto452
2 years, 4 months ago
empty?
upvoted 1 times
...
...
...
...
...
artmimois
1 year, 6 months ago
EMPTY IT IS
upvoted 1 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
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.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago