Delete directories with files-SOLVED

Write tutorials for Linux Mint here
More tutorials on https://github.com/orgs/linuxmint/discu ... /tutorials and (archive) on https://community.linuxmint.com/tutorial
Forum rules
Don't add support questions to tutorials; start your own topic in the appropriate sub-forum instead. Before you post read forum rules
Post Reply
sloto

Delete directories with files-SOLVED

Post by sloto »

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.
Fred

Re: Delete directories with files

Post by Fred »

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
sloto

Re: Delete directories with files

Post by sloto »

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
Post Reply

Return to “Tutorials”