WHAT ARE THE DANGEROUS COMMANDS FOR THE LINUX SYSTEM?

Updated on technology 2024-05-10
2 answers
  1. Anonymous users2024-02-10

    These 9 "very dangerous" Linux commands must be remembered!

    1. rm-rf command.

    The rm-rf command is the fastest way to delete a folder and its contents, and the slightest mistake or ignorance can lead to an irreversible system crash.

    The rm command is commonly used to delete files in Linux.

    rm-f command recursively deletes folders, even empty folders.

    The rm-f command can delete read-only files without asking.

    rm-rf: Force delete everything in the root directory.

    rm-rf *: Force deletion of all files in the current directory.

    rm-rf.: Force the deletion of the current folder and its subfiles.

    i, to prevent accidents when deleting files with the 'rm' command.

    2. :( commands.

    This is an instance of a fork bomb. This is done by defining a file called':'It will call itself twice, once in the foreground and the other in the background. It will repeat itself until the system crashes.

    3. Command > dev sda

    The commands listed above will add a'Command'The output is written 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 some'folders'to dev null. In Linux dev null or null device is a special file where all data written to it is cleared and then returned with a successful write operation.

    o- |sh

    6、 /dev/sda

    The commands listed above format the device'sda'You undoubtedly know that after executing the above commands, your block device will be formatted, brand new. Without any data, it directly brings your system to an unrecoverable stage.

    7、> file

    The above command is often used to clear the contents of a file, and if you enter a command like "> in the case of an error or ignorance when executed in the above column, it will overwrite the configuration file or any other system configuration file.

    8、^foo^bar

    This command is used for the previously run command without having to type the entire command. But when using the foobar command, this can lead to real trouble if you don't thoroughly check the risk of changing the original command.

    9、dd if=/dev/random of=/dev/sda

    The above command will write random junk files to the block device SDA to wipe out the data. Of course, your system may fall into a state of chaos and unrecoverable.

  2. Anonymous users2024-02-09

    1. rm-rf command.

    This command is one of the fastest ways to delete a folder and its contents, but if there is a slight error, it can cause irreparable damage to the system, here are the options for the rm command:

    The rm command is commonly used to delete files in Linux.

    rm -r: command recursively delete folders, even empty folders;

    rm -f: "read-only files" can be deleted directly without asking, so the -f parameter indicates that they do not need to be deleted one by one, but are quietly deleted;

    rn -rf : force delete everything under the root;

    rm-rf *: Force deletion of all files in the current directory.

    rm -rf .: Force the deletion of the current folder and its subfolders;

    i, to prevent the start of friends when deleting files with the 'rm' command.

    2. :( commands.

    In fact, it is a kind of fork bomb, which defines a function called ":", and calls itself twice, once in the foreground and once in the background, and such calls will loop infinitely until the system crashes.

    3. Arbitrary command > dev sda

    The output of a command is written to the block device dev sda, which 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

    In Linux, dev null or null is a special type of file that discards all the data written to them and returns a message that the operation was successful, but this command does not stop the data recovery software.

    o- |sh

    6、> file

    It is often used to clear the contents of a file or record the output of commands, but before executing, please confirm whether the output file is empty or does not exist, otherwise the original file will not be recovered.

    7、^foo^bar

    This command is used for previously run commands without having to retype the entire command, and if you don't thoroughly check the risk of changing the original command when using the foobar command, this can lead to real trouble selling rocks.

Related questions
9 answers2024-05-10

In the Linux system, we generally use the following four ways to shut down, as follows: >>>More

5 answers2024-05-10

Introduction to the file transfer commands under Linux SZ RZ SFTP SCP. >>>More

19 answers2024-05-10

This is what Windows Terminal can see.

For Tomcat in Linux, you can see this information in the logs directory where Tomcat is located, and the startup information is written to the log file. This is usually the file tomcat logs >>>More

2 answers2024-05-10

Commonly used IT servers are Linux, UNIX and Windows operating systems, among which Linux has developed rapidly because of its stable, open source, free, safe and efficient characteristics, with a market share of more than 80% in the server market, with the development of cloud computing, Linux is still the trend in the future server field! >>>More

4 answers2024-05-10

As an important direction for the future development of the Internet, Linux has a very important place. The cloud computing industry has covered various application fields such as finance, transportation, enterprise, education, medical care, information consumption, etc., and is integrated with the communication, Internet of Things, and Internet industries, and the demand for talents has intensified. >>>More