Help - Search - Members - Calendar
Full Version: delete files without conformation
Neowin Forums > *nix Customization & Support > Linux Server/BSD/Unix
::Gomez::
Hello guys, hope everything is fine..


i need to delete all the files inside a folder... but if i use del /foldername.. its asks me for everyfile if i want to delete it..


is it there any command to delete all the files inside a folder without confirmation?


Thanks
npe
I thought in this case it also gives you the option "yes to all".

edit: nmv...just noticed it's in *nix section.
::Gomez::
i am using winSCP 4 and it just tells yes or no.


night_stalker_z
rm *

http://www.computerhope.com/unix/urm.htm
::Gomez::
Thank you so much smile.gif
Borbus
Actually what you were looking for is rm -rf directoryname

Be very careful using wildcards with rm. And don't ever use a wildcard with recursive (-r).

edit: note that that will actually unlink the directory itself too, which you didn't actually specify, but I assume is what you wanted anyway, and even if it wasn't you didn't lose anything you can just make it again.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.