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

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

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: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Murteira
Highly Voted 2 years, 11 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 18 times
iwkno6
2 years, 8 months ago
Exactly!
upvoted 1 times
...
CuriousLinuxCat
2 years, 8 months ago
Fully agree that it is A.
upvoted 2 times
...
...
pablex_wolf
Highly Voted 3 years, 10 months ago
There is a typo, they mean "remove"
upvoted 6 times
...
peppiniello
Most Recent 5 months, 2 weeks ago
Selected Answer: A
folder = \dir
upvoted 1 times
...
sblancocr
7 months 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
11 months, 1 week ago
Selected Answer: A
A is correct, I tested
upvoted 1 times
...
TT924
1 year, 4 months ago
Selected Answer: A
A , /\ to display special character \
upvoted 2 times
...
blk_542
1 year, 4 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, 5 months ago
Selected Answer: A
A is correct
upvoted 1 times
...
gonzaloco
1 year, 12 months ago
Selected Answer: A
A is correct
upvoted 1 times
...
KiddyLitty
2 years 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 ago
Sorry it is "D", not C
upvoted 1 times
...
...
Lazylinux
2 years ago
Selected Answer: A
Tested it is A
upvoted 2 times
...
nedoex
2 years, 2 months ago
Selected Answer: A
\ for escaping
upvoted 3 times
...
serlan
2 years, 3 months ago
Correct answer is A.
upvoted 1 times
...
anhcq
2 years, 4 months ago
Selected Answer: A
the name \dir contain character \ which needs to be escaped by \
upvoted 1 times
...
Roger95
2 years, 5 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
...
dspaula
2 years, 5 months ago
Correct answer is A. Tested on Centos 7
upvoted 1 times
...
Avanade2023
2 years, 8 months ago
I tested on "CentOS Linux release 8.2.2004 (Core)", The answer is A(rmdir ~/\\dir). Others' results are same as "No such file or directory". but, if you run "rmdir ~/'\dir'", it will be removed successfully.
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 ...