Most shells have what I like to call "dumby aliases." In the .shellrc,
and when I say .shellrc I mean .<YOUR_SHELL>rc file. So if you are
using bash, in your .bashrc you will find various "dumby aliases."
[timh@eric timh]$ cat .bashrc
# .bashrc
# User specific aliases and functions
alias rm='rm -i'
alias mv='mv -i'
alias cp='cp -i'
alias s='cd ..'
alias d='ls'
alias p='cd -'
Those are the ones that come with bash. Cshell has the same bit
as well as most. Personally, I think they're a good idea. Helps
keep you "honest."
If you check out the man page for rm you will see, this, and other things
as well.
OPTIONS
Remove (unlink) the FILE(s).
-d, --directory
unlink directory, even if non-empty (super-user only)
-f, --force
ignore nonexistent files, never prompt
-i, --interactive
prompt before any removal
-r, -R, --recursive
remove the contents of directories recursively
-v, --verbose
explain what is being done
--help display this help and exit
--version
output version information and exit
As you see the -i is for interactive. It will ask you if you're sure
each time a new file comes across the command. When I'm deleting cache
for Netscape or deleting something in a directory that I'm sure I can
wipe out, I use rm -Rf /dir. However just like the one person commented
a rm -rf . /* will delete the . directory, which translates to your pwd, as
well as the / directory and everything in it! But that's what backups are
for! :0)
I suggets you use rm -Rfv until you're used to doing that, and are sure
you are dealing with the right info. -v, setting it to verbose will print
out everything that it's just done. So it will tell you that file <BLAH>
was removed.
As always I include more information then needed, but hopefully that was
helpful!
tdh
T. Holmes
Unixtechs.org
[EMAIL PROTECTED]
"Real Men use Vi."
* Jordan Elver <[EMAIL PROTECTED]> [010502 15:03]:
| Hi,
| How do I remove stuff i.e. rm -r folder/ without having to type yes to every
| file in the folder?
|
| I thought there might be an alias in .bashrc but I can't see anything in
| there?
|
| Any ideas?
|
| TIA, Cheers,
|
| Jord