Nov
20
Ouch!?
I received a message from another reader (with a link) that outlined some of the commands that can kill your Linux box. Most of us know about rm -rf /, that it will delete all the files in root (recursively).
But did you know about :(){:|:&};: or mv /home/yourhomedirectory/* /dev/null for example? I didn't and DO NOT run any of those commands. Doing so WILL destroy your system and cause you to lose data. I tried them on a test box (that had no valuable or important files on it), I have here (just to see), and believe the box did get mashed and I had to restore the image (or just reinstall from scratch).
Just thought I'd throw out that message to those who don't know. To find out other commands and read what the above ones actually go, just visit the link I got sent called "The 7 Deadly Linux Commands".
You'll probably be glad you read it.
Cheers!
:)
Related posts:
- Backing Up Your Ubuntu System
- 20 Useful, Common Linux (Ubuntu) Commands for New Users
- Friday Fun – Useful Linux Terminal Commands for New Users.
- Linux in 30 Days
- Linux in 30 Seconds

(2 votes, average: 4.00 out of 5)
Thanks! These are things to avoid. Thanks for posting this and the link to the rest of them. Very helpful to a newbie like me.
Hi,
I am an avid follower of your blog and would like your help in promoting my similar blog.
http://ubuntuextreme.blogspot......com/ started when I realised I was posting a lot on ubuntuforums.org and writing numerous howto’s. I realised that it would be useful for me to consolidate all of my posts into one useful blog.
Please have a look, and help me get on my feet with it! If you would like help me to provide assistance with posts, I would be glad to help. While I am not the most blog-savvy, I have a fair knowledge of Ubuntu.
Happy New Year!
Best
@Abhiroop Basu – Thank you! I looked at your blog and liked some of the posts I saw – Nice! I’ll contact you directly via email after the New Year weekend is over, as I think we both can benefit. Thank you for getting in touch and hope you have a successful New Year, filled with good fortune.
how about chown -R anything .* when the parent directory is important, because .* matches .. for example chown -R www-data .* when you are in /var/www
:(){:|:&};:is a fork bomb ( http://en.wikipedia.org/wiki/F.....ork_bomb ) it won’t destroy your system but it will cause it to lock up and probably need a reboot. It’s always fun first thing to do to a friend who has just setup a server and forgot to lock it down. It can be prevented by limiting the number of processes spawned here is a good example: http://www.cyberciti.biz/tips/.....ocess.html