My space in the world

Code is poetry

Posted by Sayak
October - 27 - 2008

The heading is self-explanatory. Linux Terminal seems dump but nothing is more clever than it. Linux is powerful and fun. When it is about something’s strength remember what Uncle Ben said.

When you are new to Linux you often seek to get help from others and almost most of the advices you get will be in the form of some commands such as ps, top, modprobe, lspci etc. Be careful when you run these commands as some Anti-Linux a**holes try to fool new Linux users in the name of tips and tutorials. If after following such command(s), you lose all your files, no one is to be blamed but you.

If you want save yourself, here is one principle: Be aware of what you are doing! Just don’t do what someone suggest you. Fireup man page, look what the command is about. This way you can learn a couple of more options too. If you are in doubt about the commands, go to a couple of forums and put all information you have such as: Hello I was trying to do this, and a guy from suggest me to issue this command. I suspect this is a harmful command. Any suggestions? Take my words, Linux carries a strong spirit with it – spirit to share knowledge. And you will get some good explanatory suggestions very quickly. If you are still in doubt, I suggest you to issue the commands inside virtual OS:

Last thing first. Today I will be posting some harmful Linux commands. DO NOT ISSUE THESE COMMANDS! These commands are just for your information. These commands are not made for making harm to your computer, but with a couple of options it can be very dangerous. After all Linux doesn’t know that a folder inside your home directory contains your first girlfriend’s picture! It is your duty to ensure they are safe. Let’s get started. I repeat DON’T ISSUE THESE COMMANDS. If you want to test, I suggest you to run them inside a virtual Linux OS.

1. The king of all devils:

rm -rf /

Q. What does rm do?

A. Removes a file

Q. What is r?

A. Recursion. That means inside a folder, of a folder, of a folder and so on

Q. what is f?

A. Force. It means you are saying to the command “Never ask me anything. Just do what you want to do”

Q. What is /

A. Your ROOT directory!

See what it does? Recursively removes all the files inside your root directory without nagging you – “Should I delete this?”

There are various versions of rm available such as:

rm -rf .
rm -rf *

Not only someone from outside, you yourself can screw up things sometimes. Little knowledge is dangerous! How about this – you want to delete all the hidden files inside a directory. That’s easy right? Hidden files are denoted with . in front so you might be thinking this command rm - .* Nooooooooooo!!! It will delete all the files one level up of the current directory.

2. How about backing up your home directory or some folders? Never try to do anything such as:

mv /home/yourhomedirectory/* /dev/null

Q. What is mv?

A. Move files

Q. What is dev/null?

A. Null means nothing. In other words, it is a black-hole.

If you issue above command, it will move all the files inside your home directory to a blackhole.

3. Linux Terminal is not a toy to play, it’s something to learn and do some productive things. I just mean to warn you don’t type anything silly and hit enter such as this:


Those seem like emoticons but they are actually shell programming stuffs and have special meaning. The above command executes different process freezing your computer and you will get a BSOD, a sort of! 😉

4. How about making a Linux filesystem?

mkfs.ext3 /dev/sda

You hard disk’s data are gone, and will never come back again. That was a poor farewell party for your documents.

5. Do you know eyes and your knowledge both can lie? Well sometimes. What do you see in the following C file written by someone claiming New sudo off-by-one poc exploit? Any sign of devil?

Leave a Reply

About Me

A son, brother and friend. Enjoys scripting and making small bits of apps here and there. Wants to conquer the world (well, who doesnt). A geek who has an obsession for ponies. Loves acoustic and wants to play guitar sitting on the Hollywood hill one day!

A Word About KDE

KDE is a versatile software compilation for all platforms. It is an intuitive and powerful desktop environment that focuses on finding innovative solutions to old and new problems, and creating a vibrant, open atmosphere for experimentation.