2024-06-20 00:37:02 -04:00
# gt
2024-07-30 23:06:52 -04:00
g(o)t(rash) is a simple, command line program to interface with the XDG Trash. Files in the trash may be listed, cleaned, or restored via an interactive table, and filtered with various flags.
2024-06-20 00:37:02 -04:00
2024-07-30 23:06:52 -04:00
## Interactive Mode
Run with no args to start interactive mode. In interactive mode, files in the trash are displayed, and may be selected to either restore or remove permanently.
## rm-like Trashing
Run with no command and only filename(s) as argument(s) to skip displaying files, sending them straight to the trash, in a quick, rm-like way.
## Commands
Files are displayed in an interactive table, allowing them to be sorted, filtered, and selectively operated on.
2024-06-20 00:37:02 -04:00
### trash / tr
2024-07-31 00:07:48 -04:00
2024-07-30 23:06:52 -04:00
Find files on the filesystem based on the filter flags and any filename args.
2024-06-20 00:37:02 -04:00
2024-07-31 00:07:48 -04:00
#### flags
*--recursive*, *-r*
operate on files recursively
*--work-dir* dir, *-w* dir
operate on files in this directory
*--hidden*, *-h*
operate on hidden files
2024-06-20 00:37:02 -04:00
### list / ls
2024-07-31 00:07:48 -04:00
2024-07-30 23:06:52 -04:00
Find files in the trash based on the filter flags and any filename args.
2024-06-20 00:37:02 -04:00
2024-07-31 00:07:48 -04:00
#### flags
*--non-interactive*, *-n*
list files and quit
*--original-path* dir, *-O* dir
list files trashed from this directory
2024-06-20 00:37:02 -04:00
### restore / re
2024-07-31 00:07:48 -04:00
2024-07-30 23:06:52 -04:00
Find files in the trash based on the filter flags and any filename args.
2024-06-20 00:37:02 -04:00
2024-07-31 00:07:48 -04:00
#### flags
*--all*, *-a*
2024-07-31 03:51:14 -04:00
restore all files in trash
2024-07-31 00:07:48 -04:00
*--original-path* dir, *-O* dir
restore files trashed from this directory
2024-06-20 00:37:02 -04:00
### clean / cl
2024-07-31 00:07:48 -04:00
2024-07-30 23:06:52 -04:00
Find files in the trash based on the filter flags and any filename args.
2024-06-20 00:37:02 -04:00
2024-07-31 00:07:48 -04:00
#### flags
*--all*, *-a*
2024-07-31 03:51:14 -04:00
clean all files in trash
2024-07-31 00:07:48 -04:00
*--original-path* dir, *-O* dir
remove files trashed from this directory
## Flags
### Global flags
*--confirm*, *-c*
ask for confirmation before executing any action
*--log* level, *-l* level
set log level
### Filter flags (usable with all commands)
*--match* pattern, *-m* pattern
operate on files matching regex pattern
*--glob* pattern, *-m* pattern
operate on files matching glob
*--not-match* pattern, *-M* pattern
operate on files not matching regex pattern
*--not-glob* pattern, *-G* pattern
operate on files not matching glob
*--on* date, *-O* date
operate on files modified on date
*--before* date, *-B* date
operate on files modified before date
*--after* date, *-A* date
operate on files modified after date
*--files-only*, *-F*
operate on files only
*--dirs-only*, *-D*
operate on directories only
*--min-size* size, *-N* size
operate on files larger than size
*--max-size* size, *-X* size
operate on files smaller than size
*--mode* mode, *-x* mode
operate on files matching mode mode
See also gt(1) or `gt --help` .
2024-07-31 00:54:22 -04:00
## Screenshots
2024-07-31 01:03:52 -04:00
![trashing screenshot ](./screenshots/Screenshot01.png )
2024-07-31 00:54:22 -04:00
2024-07-31 01:03:52 -04:00
![list screenshot ](./screenshots/Screenshot02.png )