1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Random Linux+ Question #21

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

  1. tripwire45
    Honorary Member

    tripwire45 Zettabyte Poster

    13,493
    179
    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 Administrator Administrator

    6,771
    102
    221
    I know I know it's







































    4
    :biggrin
     
    Certifications: MCSE, MCSA (messaging), ITIL Foundation v3
    WIP: Looking at doing ..................
  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
    179
    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...