Home > Operation and Maintenance > Linux Operation and Maintenance > Does linux have a recycle bin?

Does linux have a recycle bin?

尊渡假赌尊渡假赌尊渡假赌
Release: 2023-07-10 11:37:09
Original
3744 people have browsed it

Linux does not have a recycle bin. When a file is deleted, the file will be permanently deleted and cannot be recovered. You can use tools to simulate the recycle bin: 1. trash-cli, a command line tool. When using this tool to delete files, The file will be moved to a specified recycle bin directory; 2. gvfs-trash, a command line tool. When using this tool to delete a file, the file will be moved to the "~/.local/share/Trash/" directory; 3. The Recycle Bin function of the file manager, when a file is deleted, the file will be moved to the Recycle Bin directory.

Does linux have a recycle bin?

The operating system of this tutorial: Linux5.18.14 system, Dell G3 computer.

In Linux systems, there is no recycle bin by default. When you delete a file, it is permanently deleted and cannot be recovered. This is different from the Recycle Bin in Windows systems.

But you can use some tools to simulate the function of the recycle bin to delete files more safely:

1. trash-cli: This is a command line tool that can simulate recycling site functions. You can install it using the following command:

 sudo apt-get install trash-cli
Copy after login

When you use this tool to delete files, the files will be moved to a specified recycle bin directory (the default is ~/.local/share/Trash/), You can restore or permanently delete files through the command line or file manager.

2. gvfs-trash: This is a command line tool that can also be used to simulate the function of the recycle bin. It can be installed using the following command:

  sudo apt-get install gvfs-bin
Copy after login

When you delete a file using this tool, the file will be moved to the ~/.local/share/Trash/ directory. You can restore or permanently delete files through the command line or file manager.

3. The recycle bin function of the file manager: Some file managers (such as Nautilus, Caja, Dolphin, etc.) provide the recycle bin function. When you delete a file, it will be moved to the Recycle Bin directory, and you can restore or permanently delete the file through the file manager. Typically, the Trash directory is located at ~/.local/share/Trash/.

Please note that the above tools and methods may vary depending on your Linux distribution and desktop environment. You can choose the appropriate tool or method based on your system and needs.

The above is the detailed content of Does linux have a recycle bin?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template