Click to See Complete Forum and Search --> : Probably a DUMB question... rm without confirming every file?
plattypus1
03-11-2003, 05:50 PM
Okay, I've been using Linux for the past few months... and I have yet to figure out how to rm a directory without having to confirm every file... and now I have to work on a web server without X-windows and I need to delete a directory with a lot of files. Any help would be appreciated!
radcc
03-11-2003, 05:59 PM
you can double check the man files to be sure but I believe you can
rm -f to force file deletion without confirmation
rm -Rf * forces file deletion of all files in a directory then delete the directory without confirmation
jmartinez
03-11-2003, 06:02 PM
rm -rf inside that particular directory
or
rm -rf /path/to/directory/u/want/deleted
careful with that command
YOU HAVE BEEN WARNED!!!!!:D
trilarian
03-11-2003, 07:15 PM
Just want to reiterate the BE CAREFULL with the -r or -R switch. Everything after that directory INCLUDING sym links or mount points to other directories are deleted. Check for such things before issuing the command. Speaking from painfull experience.
sharth
03-11-2003, 07:58 PM
and be careful with rm in general. no trash bin in linux.
plattypus1
03-12-2003, 01:07 AM
I see... well, I'll be careful. Thanks for the help! :-)
chrism01
03-12-2003, 12:57 PM
you'll find that somewhere in the .bash_profile or .bashrc (or /etc equiv), that this alias exists
alias rm="rm -i"
see the man page; basically forces interactive/confirm mode. As the posts above explain, this is not necessarily a bad thing, esp for newbies ;)