0

I created a directory using the following command

mkdir TEST.

Now I am trying to remove it using

rm TEST and rm TEST/

but it is showing the following error:

cannot remove ‘TEST’: Is a directory and cannot remove ‘TEST/’: Is a directory

Can anyone tell me how to remove this directory using terminal?

RD017
  • 826
  • 1
  • 11
  • 25
  • 5
    To remove directories you have to use the recursive option. try `rm -r TEST`. Then take a look at `man rm` for more information. – Parto Jun 29 '16 at 07:06
  • 1
    You can try `sudo rm -r -f /path/` or `sudo rm -rf folderName` as here says :http://askubuntu.com/questions/201775/how-do-i-remove-a-folder and http://askubuntu.com/questions/217893/how-to-delete-a-non-empty-directory-in-terminal – kek Jun 29 '16 at 07:10

1 Answers1

1

The command to remove a directory is rmdir not rm.

So you just type rmdir TEST.

guntbert
  • 12,914
  • 37
  • 45
  • 86