Delete directories with files-SOLVED

Write tutorials and howtos in here
There are more tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Do not start a support topic here please. Before you post please read this

Delete directories with files-SOLVED

Postby sloto on Fri May 16, 2008 11:16 am

How do I remove directories with files? I open terminal and log in as root and tried "rmdir -p xxxx" and also "rmdir -r xxxx" and get> cannot remove directories with files.
Last edited by sloto on Fri May 16, 2008 3:55 pm, edited 1 time in total.
sloto
Level 1
Level 1
 
Posts: 29
Joined: Tue Jan 15, 2008 1:26 pm

Linux Mint is funded by ads and donations.
 

Re: Delete directories with files

Postby Fred on Fri May 16, 2008 1:25 pm

sloto,

The command you are looking for is:

rm -rv directory_name

You must run this as sudo or root if you are not the owner of the directory and everything underneath it.

Be very careful with the "rm" command. That combined with root privileges can get you into a lot of trouble. :-)

Fred
Insanity: Doing the same thing over and over and each time expecting a different result.

Democracy is 2 wolves and a lamb voting on the menu. Liberty is an armed lamb protesting the electoral outcome. A Republic negates the need for an armed protest.
User avatar
Fred
Level 10
Level 10
 
Posts: 3356
Joined: Fri Jan 04, 2008 11:59 am
Location: NC USA

Re: Delete directories with files

Postby sloto on Fri May 16, 2008 3:51 pm

Thank you Fred. I understand the warning about using the command. The folder in question was a program I had tried to install with no luck. And as it was a locked folder, I had to rm all the files and subfolders before getting rid of the main folder.
I could for see having a folder with mega items to rm one of these days.
I will add this to my little list of Linux commands with a warning tic. Thanks again.......Sloto
sloto
Level 1
Level 1
 
Posts: 29
Joined: Tue Jan 15, 2008 1:26 pm


Return to Tutorials / Howtos

Who is online

Users browsing this forum: No registered users and 8 guests