![]() ![]() The most important thing is that users must carefully confirm the instructions they have given. In the end, I think even if there are more insurance steps, the possibility of accidentally deleting the mistake will always be there. However, just like the rm command, you must first make sure that there are all unnecessary files. It's very simple, use directly: trash-emptyĪll files under Trash will be deleted. Fourth, use trash-empty to empty all files in Trash It is recommended not to use the mv command to move directly, or to cause confusion in the subsequent trash command.Ĥ. This is a little troublesome when restoring a large number of files… In fact, it can be copied directly from the path of ~/.local/share/Trash/files/ with the cp command. Suppose you want to restore 02.txt, then you have to enter its number 0. If you want to restore the files in Trash, you can enter: restore-trash Record the time of deletion and the file path before deletion. At this time, use trash-list to confirm that the file is under Trash, and you should see information like this: 20:38:40 /home/clay/02.txt Use a space to separate the two files, you can see that these two files are no longer under the current folder. Suppose I have two files that I want to delete, called 01.txt and 02.txt. Use trash-list to check whether there are any deleted files in Trash trash-listīut at the beginning, if there is no file, no information will be displayed here. ![]() In this way, the problem of rm deleting files by mistake is avoided.īefore we using trash command, we need to install it first. Files deleted using this command will not disappear completely, but temporarily moved to the bottom of Trash, which can be restored or deleted at any time. The operation flow of the trash command is the same. When we are sure that we don't really want this file, we enter Trash to delete it completely. ![]() Generally, we use the del key to delete files in the desktop environment, and the files will automatically move to the bottom of Trash. Such as Windows, there is a trash we can restore the files we deleting. Simply to put, almost all of system have a specific rule that can store the files we delete into a temporary space. That’s how I clean the recycle bin in Ubuntu. Just look for ‘Trash’ icon and right click on it and empty the trash. In other desktop environments, you can empty the trash from the file manager. You can empty the trash from here by right-clicking on it. What I want to introduce today is a command trash that can be instead of rm. Some Linux distributions (or more accurately desktop environments) have the trash bin aka the recycle bin on the desktop itself. If you use rm to delete files, if you accidentally delete the files by mistake, you may only be able to quickly restore them with Inode, BUT THIS IS OFTEN NOTE SAVED. On the one hand, the command is very brief, on the other hand, when we use the system, it is inevitable to release space and delete unnecessary old files. First, I want to explain, the rm command is a useful but danger command. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |