trash-restore - Man Page

Restore for Command line trash utility.

Examples (TL;DR)

Synopsis

trash-restore [OPTION] ​... [Path]

Description

Use to restore a trashed file or directory to the original path. This command is a part of the trash-cli package that provides a command  line interface trashcan utility compliant with the FreeDesktop.org  Trash Specification. It remembers the name, original path, deletion date, and permissions of each trashed file.

Path

Destination file path to restore from the trash. If omitted, an interactive

selection interface is used.

Options

--overwrite

Overwrite existing files with files coming out of the trash.

--sort {date,path,none}

Sort list of restore candidates by given field (default: date).

--trash-dir=TRASHDIR

Restore from TRASHDIR, for files that were trashed using a custom TRASHDIR.

-h,  --help

Show help message and exit.

--version

Show the program's version number and exit.

Examples

$ 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

Bugs

Please, report bugs to https://github.com/andreafrancia/trash-cli/issues

If You Want Say Thanks

Tweet (to @andreafrancia or #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>. The first version of manual pages was written by Steve Stalcup <vorian@ubuntu.com>  and was modified by Massimo Cavalleri <submax@tiscalinet.it>.

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.