• To remove an empty directory use the -d option.
    rm -d dirname

    Copy

  • To remove non-empty directories and all the files within them, use the r (recursive) option.
    rm -r dirname

    Copy

    If a directory or a file within the directory is write-protected, you will be prompted to confirm the deletion.

  • To remove non-empty directories and all the files without being prompted use use the r (recursive) and -f options.
    rm -rf dirname

    Copy

  • To remove multiple directories at once, use the rm command followed by the directory names separated by space.
    rm -r dirname1 dirname2 dirname3

    Copy

    Same as with files you can also use a wildcard (*) and regular expansions to match multiple directories.

 

CONTACT US

We're not around right now. But you can send us an email and we'll get back to you, asap.

Sending

©2019 RussellCoder

Log in with your credentials

or    

Forgot your details?

Create Account