TRASH-RESTORE(1)
π TRASH-RESTORE(1) π
okay bestie, welcome to trash-restore(1) β a manual page from the General Commands Manual, and honestly? it's giving "undo button for your whole life." π«Ά
β¨ NAME β¨
trash-restore β the restore half of the command line trash utility. no cap.
πΈ SYNOPSIS πΈ
trash-restore [OPTION] ... [PATH]
π¦ DESCRIPTION π¦
so basically, this is your glow-up moment: use it to restore a trashed file or directory back to the original path it came from. it puts things back where they belong, like a true friend. π
this command is part of the trash-cli package, which is a command line interface trashcan utility that is compliant with the FreeDesktop.org Trash Specification. and the way it does that? it remembers</η΄«θ²>... okay no, let me say it properly: it remembers the name, the original path, the deletion date, and the permissions of every single trashed file. iconic behaviour, honestly.
π PATH π
the destination file path you wanna restore from the trash.
if you omit it? no worries bestie, it just switches to an interactive selection interface instead. so you get to pick from a lil menu. cute.
β¨ OPTIONS β¨
--overwriteβ overwrite existing files with the files coming out of the trash. like, yes, we're bulldozing whatever's already sitting there. π--sort {date,path,none}β sort the list of restore candidates by the given field. default isdate. choices aredate,path, ornone. π--trash-dir=TRASHDIRβ restore fromTRASHDIR. use this for files that were trashed using a customTRASHDIR. iykyk. π-h,--helpβ show the help message and exit. your lil safety net. π«Ά--versionβ show the program's version number and exit. π
π₯ EXAMPLES π₯
here's the whole vibe, in one go:
$ trash-restore
0 2007-08-30 12:36:00 /home/andrea/foo
1 2007-08-30 12:39:41 /home/andrea/bar
2 2007-08-30 12:39:41 /home/andrea/bar2
3 2007-08-30 12:39:41 /home/andrea/foo2
4 2007-08-30 12:39:41 /home/andrea/foo
What file to restore [0..4]: 4
$ ls foo
foo
see? you type 4, and foo is BACK. main character energy. π
π BUGS π
found a bug? please, report bugs to https://github.com/andreafrancia/trash-cli/issues β do NOT just suffer in silence, bestie. π
π IF YOU WANT SAY THANKS π
(this heading is literally what it's called, i'm not changing it, it's too iconic)
tweet at @andreafrancia or use #trash-cli, or donate 1, 2 or 5 euros using paypal: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=93L6PYT4WBN5A
π CREDITS π
Trash was written by Andrea Francia <andrea@andreafrancia.it>. the original version of trash-empty was contributed by Einar Orn Olason <eoo@hi.is>. and the first version of the manual pages was written by Steve Stalcup <vorian@ubuntu.com> and was modified by Massimo Cavalleri <submax@tiscalinet.it>. absolute legends, all of them. π
π§ SEE ALSO π§
trash-put(1)trash-list(1)trash-empty(1)trash-rm(1)- and the FreeDesktop.org Trash Specification at https://specifications.freedesktop.org/trash-spec/trashspec-1.0.html
both are released under the GNU General Public License, version 2 or later.
and that's the whole page, bestie π this was trash-restore(1) from the General Commands Manual β go forth and un-delete things. slay, restore, repeat. πβ¨π¦
π¦ where this page comes from
- fedora 44: trash-cli 0.26.9.29-1.fc44 Β· GPL-2.0-or-later
- nixpkgs unstable: trash-cli 0.26.9.29
- Copyright (C) 2008 Steve Stalcup <vorian@ubuntu.com>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms