For non professional programmer users, the transition from virtual host, Windows system to Linux system host may be difficult. But once you get used to installing, uninstalling, deleting, and transferring files quickly with just a few words, you really feel that the efficiency is high. In particular, sometimes when we are looking for solutions, it may be our own misoperation of the rm command that causes the file to be deleted by mistake.
If the file rm is deleted, it is basically difficult to find it again. Although Lao Zuo saw many methods on the Internet, I did not try it. I will try to see if the file rm can be restored after it is deleted later. There are many ways to ensure data security, the most common one is to regularly back up, and the second is to open your eyes when rm is deleted. (We can see the tragedy that many people lost their files due to misoperation of rm by random searching.)
In this article, Lao Zuo saw a rm-protection As a gadget, you can prompt one line after the rm command is executed to ask whether to delete it. This can be seen clearly.
First, tool address
Tool address: https://github.com/alanzchen/ rm-protection
Reference documents: https://github.com/alanzchen/rm-protection/wiki
Second, examples of effects
Lao Zuo saw some netizens discussing the problem of mistakenly deleting files in V2EX before, and then someone mentioned using this. Then he collected it and never tested it. Today he recorded this tool when sorting out his favorites, so he can check it in case of future use. It may not really be used, but somehow we can see what it is like and increase the talk of bragging.
Here is an example: https://www.v2ex.com/t/337936
Lao Zuo simply found in the test machine installation that the default environment does not seem to support it (we should not be numb to install it directly in the production environment), and we need to install some components to realize it. Due to the time and ease of use, we will not install it for the time being. No matter what remedy is used, the best way is that we are serious and careful. If you are not sure and familiar with the command, don't be cool. Download the file to the local site and manually modify it before replacing or FTP deleting the file.
Scan the code to follow the official account
Get more news about webmaster circle!
Entrepreneurship, operation and new knowledge