gomi
Move files to the trash/recycle bin
TLDR
Safely delete specific files or folders
Open an interactive menu to restore one or more files
Remove files that have been in the trashcan longer than the specified time ([d]ay, [w]eek, [m]onth, [y]ear)
Remove orphaned .trashinfo files
SYNOPSIS
gomi [options] file1 file2 ...
PARAMETERS
-v, --verbose
Enable verbose output, showing each file as it is moved to the trash.
-r, --recursive
Recursively move directories and their contents to the trash. This is necessary when deleting directories.
-f, --force
Force deletion, bypassing any prompts or errors. Use with caution!
--version
Display version information and exit.
-h, --help
Display a help message and exit.
DESCRIPTION
The gomi command provides a safer alternative to the rm command by moving files and directories to the user's trash or recycle bin, instead of permanently deleting them. This allows for easy recovery of accidentally deleted files.
It adheres to the FreeDesktop.org Trash specification, ensuring compatibility with various desktop environments and file managers. The exact location of the trash directory depends on the system's configuration, but it is commonly located within the user's home directory, under ~/.local/share/Trash.
Gomi improves the user experience by presenting the trash operations in a user-friendly way, preventing unintentional data loss and providing a convenient way to manage deleted files.
CAVEATS
The gomi command relies on the FreeDesktop.org Trash specification. If the specification is not fully implemented or adhered to by your desktop environment or system, the behavior might be unpredictable.
When deleting files from a mounted volume or external drive, the files are moved to a trash directory created on that volume. If that volume is unmounted, the files in the trash directory will be unavailable until the volume is re-mounted.
INSTALLATION
The gomi command is usually distributed through package managers. You can install it using:
Debian/Ubuntu: sudo apt install gomi
Fedora/CentOS/RHEL: sudo dnf install gomi
Arch Linux: sudo pacman -S gomi
Consult your distribution's documentation for details.
FREEDESKTOP.ORG TRASH SPECIFICATION
The gomi command adheres to the FreeDesktop.org Trash specification, ensuring that deleted files are moved to a standardized trash location. This allows different applications and desktop environments to interoperate seamlessly when dealing with trashed files.