In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
Rm-rf is the most well-known file deletion command under the Linux system, which is used to force the deletion of files recursively without prompting. You only need to type "rm-rf" (without double quotes) in the command line interface of Linux to invoke this instruction to delete all files in the current directory and cannot be recovered.
Extended meaning of rm-rf
An instruction that forcibly loops to delete everything in a Linux system. One of the commands that programmers are most afraid of shaking hands. Once used improperly, it will create a super black hole, which is so powerful that it is possible to inhale everything, including the work of the programmer. So be sure to keep a clear head, take three deep breaths, say "HelloWorld" silently, and run after making sure there are no strange spaces behind rm-rf!
Rm-rf instruction parsing
Rm
The file deletion instruction under the Linux system can delete one or more files or directories in a directory, or delete a directory and all its subordinate files and their subdirectories. For linked files, only the entire linked file is deleted, while the original file remains unchanged.
-rf
The two parameters of the rm directive-r and-f are co-written,-r means to process files recursively, that is, to process eligible files under the directory and all its subdirectories;-f is forced deletion without prompting.
We create a directory an in the root directory and a b file and c file in the a directory
Use # rm-rf/a to see how it works.
The command # rm-rf is fine for normal use, because it is a command to delete an entire directory.
Then we delete / delete /
It will give you a hint here, so you don't usually misoperate. What is said on the Internet is that version 7 added this prompt, so those below 7 should be careful!
However, / * will be carried out directly.
Although all of them cannot be deleted.
But it still works, that is, some commands can't be used.
But shouldn't it have crashed immediately? How can I still operate it? Anyway, let's restart it and see what happens.
Well, it looks like it's dead.
Therefore, rm is not recommended, use mv to move files to / delete/, and then write a scheduled task to delete every month. It is equivalent to the function of a recycling bin.
The above is all the contents of the article "how to use rm-rf instructions in linux". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
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.