how to delete a directory from terminal

Asked by peter

Hello

In the file system I have to delete a directory which contains other directories, How can I do this?

I got an error message:
peter@peter:/opt/lampp/htdocs/testdb/installation$ sudo rmdir '/opt/lampp/htdocs/testdb/installation'
rmdir: failed to remove `/opt/lampp/htdocs/testdb/installation': Directory not empty

Thanks in advance,
Peter

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu gnome-terminal Edit question
Assignee:
No assignee Edit question
Solved by:
peter
Solved:
Last query:
Last reply:
Revision history for this message
Senthil Kumar_Webrsk (webrsk-ideas) said :
#1

Its one of the general UNIX command.

$ rm -rf directoryname
Note: Be carefull , It will delete everything including subdirectories and files.

In your case.
$ cd /opt/lampp/htdocs/testdb/
$ rm -rf installation

Search engine like 'google' always helps you to know more unix commands like this.

Revision history for this message
peter (peter-neuweiler) said :
#2

Thanks, Senthil.