File trashing utility for the terminal
Summary
This project is a cross-platform file trashing utility for the terminal that can reverse file deletion.
Tested on Linux, FreeBSD & Windows.
See docs/ for more information.
Pre-built binaries:
Release binaries are provided for Linux, FreeBSD & Windows.
Build Pre-requisites:
*Requires the build2-toolchain to be pre-installed. See https://build2.org/install.xhtml
*Requires c++23 supporting compiler.
(Optional): For building compilation database use latest staged toolchain.
Build Instructions:
mkdir trash.d
cd trash.d
git clone https://github.com/Isfand/trash.git
cd trash
POSIX: ./config-init.sh
WIN32: .\config-init.ps1
bdep update -a
This should build all initialized build configurations.
To list all build configs, type: bdep config list
To clean all build configs and dependencies recursively, type: bdep clean -a -r
To update a specific config: bdep update @<config-name>
To clean a specific config: bdep clean @<config-name>
Install
POSIX:
cd into your release target build configuration directory. E.G: cd ../trash-x64-posix-llvm-release
And type:
b install config.cxx.loptions="-L/usr/local/lib -Wl,-rpath,/usr/local/lib" config.install.root="/usr/local/" config.install.sudo="sudo"
To uninstall just replace install with uninstall for the command above.
This should work on any POSIX compliant platform.
WIN32:
WIP
Basic usage:
*Note, '--help' option changes message when applied after a primary command:
Primary commands
Deleting files:
Listing files:
Restoring files:
Erasing files:
Validating files:
Environment variables:
TRASH_DIR
The directory where the trash/ folder will be located. Defaults to '$HOME/.trash/'. The directory filename before the last delimiter will be used as the root of the trash directory name.
E.G 'export TRASH_DIR=/home/user/.local/shared/.trashAlt/', will make .trashAlt/ become the trash directory name.
If you find the program useful then consider donating
| version | 0.9.4 |
|---|---|
| license | Eclipse Public License 2.0 |
| repository | https://pkg.cppget.org/1/alpha |
| download | trash-0.9.4.tar.gz |
| sha256 | 28d45a3303a0d0a5a56578f65de0a89b8e7f8f76c7e03835292e14a5aa801454 |
| project | trash |
|---|---|
| url | github.com/Isfand/trash |
| topics | trash-managertrashingtrashcanrecycling-bin |
Depends (1)
| libsqlite3 ^3.45.3+1 |
Requires (1)
| c++23 |
Reviews
| fail | 0 |
|---|---|
| pass | 0 |
Builds
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_fedora_43-gcc_15-bindist |
| timestamp | 2026-11-06 11:02:35 UTC (10:58:28 hours ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-microsoft-win32-msvc14.5 |
| tgt config | windows_10-clang_21_msvc_18-static_O2 |
| timestamp | 2026-11-04 10:10:43 UTC (02 11:50:20 days ago) |
| result | error (update) | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-microsoft-win32-msvc14.5 |
| tgt config | windows_10-clang_21_msvc_18-O2 |
| timestamp | 2026-11-04 10:10:36 UTC (02 11:50:27 days ago) |
| result | error (update) | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-microsoft-win32-msvc14.5 |
| tgt config | windows_10-msvc_18-static_O2 |
| timestamp | 2026-11-04 10:10:11 UTC (02 11:50:52 days ago) |
| result | error (update) | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-microsoft-win32-msvc14.5 |
| tgt config | windows_10-msvc_18-O2 |
| timestamp | 2026-11-04 10:10:06 UTC (02 11:50:57 days ago) |
| result | error (update) | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-microsoft-win32-msvc14.5 |
| tgt config | windows_10-clang_21_msvc_18 |
| timestamp | 2026-11-04 10:10:05 UTC (02 11:50:58 days ago) |
| result | error (update) | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-microsoft-win32-msvc14.5 |
| tgt config | windows_10-msvc_18 |
| timestamp | 2026-11-04 10:09:17 UTC (02 11:51:46 days ago) |
| result | error (update) | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_ubuntu_26.04-gcc_15-bindist |
| timestamp | 2026-11-03 12:51:04 UTC (03 09:09:59 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-apple-darwin23.5.0 |
| tgt config | macos_14-clang_15.0-static_O3 |
| timestamp | 2026-11-02 00:42:12 UTC (04 21:18:52 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-apple-darwin23.5.0 |
| tgt config | macos_14-clang_15.0-O3 |
| timestamp | 2026-11-02 00:40:47 UTC (04 21:20:16 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-apple-darwin23.5.0 |
| tgt config | macos_14-clang_15.0 |
| timestamp | 2026-11-02 00:39:24 UTC (04 21:21:39 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-w64-mingw32 |
| tgt config | windows_10-gcc_15.2_mingw_w64-static_O2 |
| timestamp | 2026-11-01 10:12:38 UTC (05 11:48:25 days ago) |
| result | error (update) | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-w64-mingw32 |
| tgt config | windows_10-gcc_15.2_mingw_w64 |
| timestamp | 2026-11-01 10:12:01 UTC (05 11:49:02 days ago) |
| result | error (update) | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-w64-mingw32 |
| tgt config | windows_10-gcc_15.2_mingw_w64-O2 |
| timestamp | 2026-11-01 10:11:59 UTC (05 11:49:04 days ago) |
| result | error (update) | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_fedora_44-gcc_16-bindist |
| timestamp | 2026-10-29 20:01:59 UTC (08 01:59:04 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | aarch64-linux-gnu |
| tgt config | linux_debian_12-clang_18-O3 |
| timestamp | 2026-10-27 10:43:31 UTC (10 11:17:32 days ago) |
| result | error (update) | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | aarch64-linux-gnu |
| tgt config | linux_debian_12-clang_18-static_O3 |
| timestamp | 2026-10-27 10:42:55 UTC (10 11:18:09 days ago) |
| result | error (update) | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | aarch64-linux-gnu |
| tgt config | linux_debian_12-clang_18 |
| timestamp | 2026-10-27 10:42:46 UTC (10 11:18:17 days ago) |
| result | error (update) | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_ubuntu_24.04-gcc_13-bindist |
| timestamp | 2026-10-27 10:29:21 UTC (10 11:31:42 days ago) |
| result | error (update) | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-apple-darwin22.5.0 |
| tgt config | macos_13-clang_15.0 |
| timestamp | 2026-10-27 10:15:58 UTC (10 11:45:05 days ago) |
| result | error (update) | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | aarch64-linux-gnu |
| tgt config | linux_debian_12-gcc_14-ndebug_O3 |
| timestamp | 2026-10-27 03:50:17 UTC (10 18:10:46 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | aarch64-linux-gnu |
| tgt config | linux_debian_12-clang_18_libc++-O3 |
| timestamp | 2026-10-26 13:45:48 UTC (11 08:15:15 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | aarch64-linux-gnu |
| tgt config | linux_debian_12-clang_18_libc++-static_O3 |
| timestamp | 2026-10-26 13:45:29 UTC (11 08:15:34 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | aarch64-linux-gnu |
| tgt config | linux_debian_12-clang_18_libc++ |
| timestamp | 2026-10-26 13:44:00 UTC (11 08:17:03 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_13-clang_22_libc++-static_O3 |
| timestamp | 2026-10-26 07:31:37 UTC (11 14:29:26 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_13-clang_22_libc++-O3 |
| timestamp | 2026-10-26 07:30:51 UTC (11 14:30:12 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_13-clang_22-static_O3 |
| timestamp | 2026-10-26 07:28:51 UTC (11 14:32:12 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_13-clang_22-O3 |
| timestamp | 2026-10-26 07:27:39 UTC (11 14:33:24 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_13-clang_22_libc++ |
| timestamp | 2026-10-26 07:25:52 UTC (11 14:35:11 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_13-clang_22 |
| timestamp | 2026-10-26 07:24:39 UTC (11 14:36:24 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | aarch64-linux-gnu |
| tgt config | linux_debian_12-gcc_14-static_O3 |
| timestamp | 2026-10-25 11:47:11 UTC (12 10:13:52 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | aarch64-linux-gnu |
| tgt config | linux_debian_12-gcc_14-O3 |
| timestamp | 2026-10-25 11:46:30 UTC (12 10:14:33 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | aarch64-linux-gnu |
| tgt config | linux_debian_12-gcc_14 |
| timestamp | 2026-10-25 11:45:21 UTC (12 10:15:42 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_13-gcc_16-static_O3 |
| timestamp | 2026-10-25 11:43:26 UTC (12 10:17:38 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_13-gcc_16-O3 |
| timestamp | 2026-10-25 11:43:17 UTC (12 10:17:46 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_13-gcc_16 |
| timestamp | 2026-10-25 11:42:27 UTC (12 10:18:36 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_13-gcc_16-ndebug_O3 |
| timestamp | 2026-10-25 11:38:15 UTC (12 10:22:48 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_13-gcc_14-bindist |
| timestamp | 2026-10-25 11:10:07 UTC (12 10:50:56 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_13-gcc_15-O3 |
| timestamp | 2026-10-25 11:09:26 UTC (12 10:51:37 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_13-clang_21_libc++ |
| timestamp | 2026-10-25 11:09:06 UTC (12 10:51:57 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-freebsd15.0 |
| tgt config | freebsd_15-clang_19-static_O3 |
| timestamp | 2026-10-25 11:08:27 UTC (12 10:52:36 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-freebsd15.0 |
| tgt config | freebsd_15-clang_19-O3 |
| timestamp | 2026-10-25 11:08:12 UTC (12 10:52:51 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_13-clang_21 |
| timestamp | 2026-10-25 11:08:10 UTC (12 10:52:53 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_13-gcc_15 |
| timestamp | 2026-10-25 11:07:55 UTC (12 10:53:09 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-freebsd15.0 |
| tgt config | freebsd_15-clang_19 |
| timestamp | 2026-10-25 11:07:20 UTC (12 10:53:43 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-freebsd14.1 |
| tgt config | freebsd_14-clang_18 |
| timestamp | 2026-10-25 11:06:54 UTC (12 10:54:10 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-microsoft-win32-msvc14.3 |
| tgt config | windows_10-msvc_17 |
| timestamp | 2026-10-24 10:36:29 UTC (13 11:24:34 days ago) |
| result | error (update) | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | aarch64-linux-gnu |
| tgt config | linux_debian_12-gcc_13 |
| timestamp | 2026-10-24 10:15:48 UTC (13 11:45:15 days ago) |
| result | error (update) | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-apple-darwin23.5.0 |
| tgt config | macos_14-gcc_14_homebrew-static_O3 |
| timestamp | 2026-10-16 08:02:18 UTC (21 13:58:45 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-apple-darwin23.5.0 |
| tgt config | macos_14-gcc_14_homebrew-O3 |
| timestamp | 2026-10-16 07:56:36 UTC (21 14:04:27 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-apple-darwin23.5.0 |
| tgt config | macos_14-gcc_14_homebrew |
| timestamp | 2026-10-16 07:53:22 UTC (21 14:07:41 days ago) |
| result | success | log | rebuild |