The rm command

Be very careful with the rm command for those that don't know what they are doing. I reckon noobs should have an alias setup so rm actually invokes mv to put the stuff in trash so you can always recover :D
 
haha no kidding. I remember the one night I got a call, the support agent told me whole server is down. I asked, what happened, and he explained all was fine until he helped a customer delete some files. I asked, do you remember the exact command, it turned out something like "rm -Rf /*" and he ran it as root. Needless to say, server had to be restored from backups.
 
haha no kidding. I remember the one night I got a call, the support agent told me whole server is down. I asked, what happened, and he explained all was fine until he helped a customer delete some files. I asked, do you remember the exact command, it turned out something like "rm -Rf /*" and he ran it as root. Needless to say, server had to be restored from backups.

Had the same type of thing. The only difference is that the customer wanted to type "rm -rf ./", but added a space by mistake "rm -rf . /". Same effect, and recovery.
 
Two very good tips for system admins are:
1. Never use rm with the force paramater, and,
2. alias rm=rm -i (which will prompt / default on CentOS)

Another philosophical debate is the trailing slash. Directories can be removed without the leading slash, so it's unnecessary and shouldn't be used - navigate to the parent directory, and then rm dir.
 
Had the same type of thing. The only difference is that the customer wanted to type "rm -rf ./", but added a space by mistake "rm -rf . /". Same effect, and recovery.

Bloody hell I have a guy in the office who also insists on referring to the current folder with full stop for "safety" and the more I try to slap it into him that it's potentially super dangerous if he gets it wrong the more he argues that if accidentally he in the wrong folder then nothing with happen at least.

So now he gets very limited rights. ;)
 
Some wallpaper for your laptop:

RM.resized.jpg
 
On some [probably most] of the Linux forums, suggesting the rm command will get you banned :D
 
Top
Sign up to the MyBroadband newsletter
X