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
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.
trash-cli package I have no idea whether this is possible.