开发者

Restore trash item to original location - Linux [closed]

开发者 https://www.devze.com 2023-01-22 06:09 出处:网络
Cl开发者_开发问答osed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Cl开发者_开发问答osed. This question is off-topic. It is not currently accepting answers.

Want to improve this question? Update the question so it's on-topic for Stack Overflow.

Closed 10 years ago.

Improve this question

I'm wondering if it is possible to restore a file that is in the trash (~/.Trash) to its original location.

I understand there is a restore command but I don't understand its arguments or how to correctly use it.

Is this a fairly simple thing to do?

Cheers


If your desktop environment followed the XDG Trash Can Specification when trashing the file, then restore-trash from trash-cli would do the trick.

What desktop do you use?


.Trash is just a (hidden) directory. All you need to do is move it out:

mv ~/.Trash/foo ~/

or using the file browser of your desktop environment, open the trash and drag it out.


As far as I know, in the trash folder (~/.local/share/Trash/), there is a folder with the files (files/) and a folder with the file information (info/). Each file has an associated .trashinfo file in which the original path and time of deletion are stored. You can use that to restore the file to its original location.

0

精彩评论

暂无评论...
验证码 换一张
取 消