exam questions

Exam 101-400 All Questions

View all questions & answers for the 101-400 exam

Exam 101-400 topic 3 question 10 discussion

Actual exam question from LPI's 101-400
Question #: 10
Topic #: 3
[All 101-400 Questions]

A user accidentally created the subdirectory \dir in his home directory. Which of the following commands will remove that directory?

  • A. rmdir '~/\dir'
  • B. rmdir "~/\dir"
  • C. rmdir ~/'dir'
  • D. rmdir ~/\dir
  • E. rmdir ~/\\dir
Show Suggested Answer Hide Answer
Suggested Answer: E 🗳️

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
davitnoreyan
7 months, 1 week ago
D but we can remove rm -r dirname
upvoted 1 times
...
DuboisNicolasDuclair
1 year, 2 months ago
Selected Answer: E
To remove the subdirectory `\dir` from the user's home directory, you can use the following command: E. `rmdir ~/\\dir` The backslash (`\`) is an escape character, and to use it as part of the directory name, you need to escape it with another backslash (i.e., `\\`). This way, the `rmdir` command will correctly interpret the directory name as `\dir`.
upvoted 1 times
...
cast7omadrid1
4 years, 9 months ago
la respuesta correcta es: D
upvoted 1 times
cast7omadrid1
4 years, 7 months ago
I was wrong. If you create a directory with mkdir /\dir, you create a directory \dir. To eliminate it we need to escape \ that's why we use rmdir /\\dir
upvoted 1 times
...
sis_net_sec
2 years, 8 months ago
Yes the correct answer is D
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