Random Linux+ Question #21

Discussion in 'Linux+' started by tripwire45, Jul 12, 2005.

  1. tripwire45
    Honorary Member

    tripwire45 Zettabyte Poster

    13,493
    180
    287
    You want to remove a directory named test and all of it's contents on the command line. To do this, you type in:
    Code:
    rmdir test
    , however, you get a message saying
    Code:
    rmdir: 'test': Directory not empty
    You discovered that you cannot use the rmdir command if the directory is not empty. There are too many files in the test directory to go in and remove them individually. What command can you give to delete the directory and its contents? Choose only one answer:

    1. rm test
    2. rm -d test
    3. rm -f test
    4. rm -r test
    5. rmdir -d test
    6. rmdir -f test
    7. rmdir -r test

    Answer later.
     
    Certifications: A+ and Network+
  2. AJ

    AJ 01000001 01100100 01101101 01101001 01101110 Administrator

    6,897
    182
    221
    I know I know it's







































    4
    :biggrin
     
    Certifications: MCSE, MCSA (messaging), ITIL Foundation v3
    WIP: Breathing in and out, but not out and in, that's just wrong
  3. nugget
    Honorary Member

    nugget Junior toady

    7,796
    71
    224
    Number 7 for me.:D
     
    Certifications: A+ | Network+ | Security+ | MCP (270,271,272,290,620) | MCDST | MCTS:Vista
    WIP: MCSA, 70-622,680,685
  4. tripwire45
    Honorary Member

    tripwire45 Zettabyte Poster

    13,493
    180
    287
    Answer time. Correct answer is 4 "rm -r". I know it seems counterintuitive since you remove an empty directory with the "rmdir" command, but I don't write this stuff. Congratulations, AJ and better luck next time Nugget. :)
     
    Certifications: A+ and Network+

Share This Page

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.