damainman
02-08-2004, 11:47 PM
I put something in the wrong folder.. and can't remove it
root@server22 [/usr/src]# rm mailscanner-autoinstall-1.5/
rm: remove directory `mailscanner-autoinstall-1.5/'? y
rm: cannot remove directory `mailscanner-autoinstall-1.5/': Is a directory
Any ideas?
4Hosted
02-08-2004, 11:52 PM
try 'rm -rf' ??
im not sure how effective it is but always works for me :)
between if you just placed it in wrong folder you can use mv command as well ;)
Coach
02-09-2004, 02:30 AM
rmdir will only work if the directory is empty. rm will remove files.
So if you want to remove a directory with a bunch of files in it, we'll call this directory "foo" for example.
rm -rf foo
That will remove the directory and the files. :)
damainman
02-09-2004, 02:45 AM
Thanks for everyones help and reply.
aldee
02-09-2004, 07:10 AM
Whereas -r stands for recursive (required for directories) and -f stands for force (deletes write protected files / sub directories as well).
aingaran
02-09-2004, 10:49 AM
As I stated elsewhere, if you don't know what rm -rf does, you should not really play around with it.
It'll delete directories without asking you for confirmation...If you make a boo boo, then you might be in deep doo doo!
Me being the paranoid fool that I am, when I'm using rm -rf, I type with 2 fingers. (my 2 index fingers, just to make sure I enter the correct directory name.)