{"repo":"qqAys/trash.sh","free":true,"listed":false,"github":"https://github.com/qqAys/trash.sh","clone":"git clone https://github.com/qqAys/trash.sh.git","description":"A safer rm alternative that moves files and directories to a trash bin instead of permanently deleting them. Simplifies file recovery with easy installation and an option to empty the trash.","language":"Shell","stars":59,"topics":["file-recovery","remove-files","rm","safety","trash","trash-bins","safe-rm","shell"],"license":"MIT","category":"cli-tools","readme_excerpt":"中文 trash.sh trash.sh is a script that serves as a safe alternative to rm , allowing for secure handling of files and directories by moving them to a trash bin instead of permanently deleting them. If you use trash.sh as described below, rm essentially becomes mv . trash.sh handles moving items to the trash for you, so please be aware of this change! Installation 1. Download the trash.sh file to your user directory: 2. Add execute permissions: 3. Add an alias (doesn't have to be rm ) to your .bashrc or .zshrc : Usage \"Deleting\" Files or Directories To move files or directories to the trash, use the rm command as usual: You will receive a confirmation prompt before \"deletion.\" Emptying the Trash Emptying the trash involves calling /bin/rm with the -rf parameter to clear the /.trash folder. This action is irreversible. To empty the trash, use the -c parameter: You will be prompted to confirm the emptying of the trash, and its contents will be displayed before deletion. Trash Structure Files you \"delete\" will be renamed with the current timestamp and moved ( mv ) to the /.trash folder. If you \"delete\" a directory, its contents will not be renamed. The structure of the trash looks like this: Note ⚠️ Using trash.sh does not guarantee that data or files will be securely \"deleted.\" You should still back up important data to ensure its safety. License This project is licensed under the MIT License - see the LICENSE file for details. Contributing Please submit a pull request or open an","default_branch":null,"files":null,"tree":[],"storefront":"/r/qqAys","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/qqAys/trash.sh/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}