I don't find this accepted answer entirely satisfactory: files or directories which are sent to Trash have their original location somehow recorded with them so that it is possible to restore them without necessarily knowing that original location.
As a non-root user you can usually use your file explorer, Nemo in my case (OS Linux Mint 18.3), to restore, by clicking Trash and then finding the restore command in the context menu (right-click) of the file in question.
When you run Nemo as root (gksudo nemo
) however, this doesn't work: the Trash bounces your focus away, giving you a "no access" message, and doesn't display its contents properly.
But there is a solution which I found: install the trash-cli
package.
One of the commands there is restore-trash
, incidentally wrongly documented as trash-restore(1)
in the man trash
page under "SEE ALSO". Going, instead,
man 1 restore-trash
shows you how this command works: you choose a number from the listed files. You don't need to know the restore location.
Without the trash-cli
package I have no idea whether this is possible.
find
trying to search particular directories that it can't access. It looks like it foundrescuee.img
in the directory/media/.../cff201e8-c3bc-4517-95d9-862c547f26f2/.Trash-0/files/
. It's not in that directory, is it?