Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam 101-500 All Questions

View all questions & answers for the 101-500 exam

Exam 101-500 topic 1 question 100 discussion

Actual exam question from LPI's 101-500
Question #: 100
Topic #: 1
[All 101-500 Questions]

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

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

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Murteira
Highly Voted 3 years, 4 months ago
People pointing answers C and D are not creating the directory with the leading \. To do that you need do use mkdir "\dir" since mkdir \dir will create a directory named only "dir". Thats why C and D are working for them. Correct answer is A.
upvoted 19 times
iwkno6
3 years, 2 months ago
Exactly!
upvoted 1 times
...
CuriousLinuxCat
3 years, 2 months ago
Fully agree that it is A.
upvoted 2 times
...
...
pablex_wolf
Highly Voted 4 years, 4 months ago
There is a typo, they mean "remove"
upvoted 6 times
...
b703161
Most Recent 3 weeks ago
Selected Answer: D
The correct answer is D: [worker1@server ~]$ mkdir \dir [worker1@server ~]$ cd .. [dawoud@server home]$ rmdir ~/\\dir rmdir: konnte '/home/worker1/\dir' nicht entfernen: Datei oder Verzeichnis nicht gefunden
upvoted 1 times
...
Aleksandre
2 months, 2 weeks ago
On arch linux worked rmdir ~/\dir, rmdir ~/'dir'.
upvoted 1 times
...
peppiniello
11 months, 1 week ago
Selected Answer: A
folder = \dir
upvoted 1 times
...
sblancocr
1 year ago
I think rhat C and D... on this cases... works the remove directory $ mkdir dir $ ls dir $ ls d* dexample.gz.tar dir: rmdir ~/\dir $ ls d* dexample.gz.tar $ mkdir dir sblanco@idp:~$ rmdir ~/'dir' sblanco@idp:~$ ls d* dexample.gz.tar $ mkdir dir $ rmdir ~/'dir' $ ls d* dexample.gz.tar
upvoted 1 times
...
Jack67
1 year, 5 months ago
Selected Answer: A
A is correct, I tested
upvoted 1 times
...
TT924
1 year, 10 months ago
Selected Answer: A
A , /\ to display special character \
upvoted 2 times
...
blk_542
1 year, 10 months ago
Selected Answer: A
A: seen as correct in another guide and tested in my home directory as regular user, cemtos 7, not root: mkdir "\dir" ls -l \dir then tried the different deleting options and the only working was A, no need to use any quotation marks.
upvoted 1 times
...
meer01
1 year, 11 months ago
Selected Answer: A
A is correct
upvoted 1 times
...
gonzaloco
2 years, 5 months ago
Selected Answer: A
A is correct
upvoted 1 times
...
KiddyLitty
2 years, 6 months ago
Answer A didn't work for me. Double backslash is not working on CentOS7 minimal with or without quotes. Agree with "C"
upvoted 1 times
KiddyLitty
2 years, 6 months ago
Sorry it is "D", not C
upvoted 1 times
...
...
Lazylinux
2 years, 6 months ago
Selected Answer: A
Tested it is A
upvoted 2 times
...
nedoex
2 years, 8 months ago
Selected Answer: A
\ for escaping
upvoted 3 times
...
serlan
2 years, 9 months ago
Correct answer is A.
upvoted 1 times
...
anhcq
2 years, 10 months ago
Selected Answer: A
the name \dir contain character \ which needs to be escaped by \
upvoted 1 times
...
Roger95
2 years, 10 months ago
basically, you can create \dir directory in homedir using 'mkdir ~/\\dir' That's why answer is A that using the same way to remove it. Note: backslash "\" used to remove special meaning on the following character, Example: \x will display x as string even though x has a special meaning.
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 ...