Delete directories with files-SOLVED
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
Don't add support questions to tutorials; start your own topic in the appropriate sub-forum instead. Before you post read forum rules
Delete directories with files-SOLVED
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.
Re: Delete directories with files
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
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
Re: Delete directories with files
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
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