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.
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.
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
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.
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.
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.
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.
Murteira
Highly Voted 2 years, 11 months agoiwkno6
2 years, 8 months agoCuriousLinuxCat
2 years, 8 months agopablex_wolf
Highly Voted 3 years, 10 months agopeppiniello
Most Recent 5 months, 2 weeks agosblancocr
7 months agoJack67
11 months, 2 weeks agoTT924
1 year, 4 months agoblk_542
1 year, 5 months agomeer01
1 year, 5 months agogonzaloco
2 years agoKiddyLitty
2 years agoKiddyLitty
2 years agoLazylinux
2 years agonedoex
2 years, 2 months agoserlan
2 years, 3 months agoanhcq
2 years, 4 months agoRoger95
2 years, 5 months agodspaula
2 years, 5 months agoAvanade2023
2 years, 8 months ago