It takes about 1 minute to read this article.

Open the terminal, obtain root permission, and run the following command: rm -rf /* What happens? Anyone who has ever touched Linux has probably heard the story of what can happen next.

Run this command on Linux, and the system will faithfully execute the command, even if the result of executing it is to delete itself. Do not execute this command in a production environment, otherwise there will be no regret medicine to buy!

“Rm” Linux delete command;

“-r” a parameter in the rm command, indicating recursive deletion.

“-f” is a parameter in the rm command, indicating forcible deletion.

/* indicates the system root directory, and /* indicates any file in the system root directory.

1. When the command is executed again, an error message is displayed indicating that some files with special permissions cannot be deleted (protected by the system, perhaps with I permissions). However, this does not affect the execution of the command.

2. After the command is executed, the top, free, and ls commands used on the terminal are invalid, and the /bin directory is deleted, leaving only the CD available.

3. In addition, Linux will not be able to shut down properly, and the commands related to the shutdown operation will also be deleted.

4. After forcibly shutting down the system, try to power on the system again, but the system cannot normally enter again. You can only reinstall the system.

Judging from the above results, even basic commands cannot be executed, so user data (such as installed software, deployed websites, databases, etc.) must also be completely deleted.

Therefore, good habits should be developed during operation. Use mv command instead of RM command. For example, to delete abc. TXT files, run mv abc. TXT /temp online and then write a script to periodically delete files in the /temp directory, which is much safer.


, END,

The growth path of programmers

Though the road is long, the journey is sure to come

This article was originally posted on the wechat public account of the same name “The Growth of programmers”, reply to “1024” you know, give a thumbs up.

Wechat ID: cxyDCzzl


Highlights from the past

7 big platform tools for programmers to connect private work

The growth path of Java programmers

Why does TCP require a three-way handshake

50 Details of Java Performance Optimization (Collector’s Edition)

Design e-commerce platform coupon system

A conversation that tells you what an architect does?

Teach you a way to use IDE programming to improve efficiency SAO operation!

The classic ebook package for programmers