PrepAway - Latest Free Exam Questions & Answers

Which of the following commands will remove that directory?

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

PrepAway - Latest Free Exam Questions & Answers

A.
rmdir ~/’dir’

B.
rmdir ~/\\dir

C.
rmdir ‘~/\\dir’

D.
rmdir “~/\\dir”

E.
rmdir ~/\\\\dir

9 Comments on “Which of the following commands will remove that directory?

    1. director47 says:

      It is E.

      B would remove a directory of the name \dir since the first \ is to escape the following \

      Test it by creating the directory \\dir. In order to create that directory, you would need to type mkdir ~/\\\\dir. The first \ would escape the second \ and the 3rd \ would escape the 4th \ thus creating \\dir

      So in order to remove it you would do the same.

      rmdir ~/\\\\dir where the first \ would escape the second \ and the 3rd \ would escape the 4th \




      1



      0
  1. manni9 says:

    Answer E is correct!

    To create a directory named \\dir the command mkdir \\\\dir is required.

    With the command rmdir \\\\dir the directory is deleted.

    If a \ is used in the name of a directory, every \ with a preceding \ must be used.




    0



    0

Leave a Reply