10 most dangerous commands of the Linux system

Source: Internet
Author: User
Tags parent directory root directory

Linux command line very useful, efficient, and interesting, but sometimes dangerous, especially when you're not sure what you're doing. This article is not intended to provoke your anger at Linux or Linux command lines. We just want you to realize that you should think twice before you run certain commands. Of course, the following commands are usually in the root of the ability to play stupid to be hopeless, under the ordinary user identity, the destruction of only their own acres of three points. )

1. RM-RF command

The RM-RF command is one of the quickest ways to delete a folder and its contents. Just a little mistake or ignorance can cause an unrecoverable system to collapse. The following are options for some RM commands.

RM commands are typically used to delete files under Linux.

The RM-R command recursively deletes folders, even empty folders. I think it should be wrong here, from common sense, it should be "even a Non-empty folder".

The rm-f command can delete ' read-only files ' without asking. Under Linux, deleting a file doesn't care whether the file is read-only, but only whether the parent directory has write permissions. So, the-f argument just means that you don't have to delete the confirmation, but you silently delete it. In addition, the original RM command is not a deletion hint, except that the general distribution will add the-i parameter in the alias to require deletion confirmation, while-f suppresses the hint. )

RM-RF/: Force Delete all Dongdong under root directory. (That is, after the deletion, there is nothing ...) )

RM-RF *: Forces all files in the current directory to be deleted.

Rm-rf. : Forces the deletion of the current folder and its subfolders.

From now on, please be careful when you want to execute the RM-RF command. We can create a rm-i alias for the ' RM ' command in the '. BASHRC ' file to prevent an accident from deleting a file with the ' RM ' command, and it will ask you to confirm each deletion request. Most distributions have done so, and if not, do so and be sure to consider what you are doing before using the-f argument! The translator himself has a lesson of blood and tears. )

2.:() {: |:&;: command

This is an example of a fork bomb. The specific operation is by defining a function called ': ' it will call itself two times, once in the foreground another run in the background. It will be executed repeatedly until the system crashes.

:() {: |:&};:

Oh? Are you sure you want to try? Don't experiment on the company's official server.

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.