Score:0

deleted a folder from root(user), ubuntu how do i access the trash bin from terminal?

br flag

i have deleted a folder from the root user dir (same where var,usr,home,etc,lib is stored) using the Webmin browser GUI ...on url http:// IP :10000

VPS:

  • ubuntu 18.04
  • User : root
  • no GUI, only SSH and Webmin providing by the hosting site

i have found lot of answers, use:

cd .local/share/Trash/files
$ cd .local/share/Trash/
~/.local/share/Trash/*

error:

/root/.local/share/Trash: No such file or directory

these do not exist anymore...please anyone update the path..

i m currently at:

root@kivee:~#

How can i restore it?

Harsh Jadon avatar
br flag
@user535733 i deleted it with the Webmin browser GUI ...on url http://xxx.xx.IP.xx:10000
Harsh Jadon avatar
br flag
@user535733 yeah sorry, done
Score:0
cn flag

A trash is maintained and used by graphical file managers in your desktop environment only. No trash is implemented when you use the command line, neither as normal user or as administrator. The command rm will remove files without moving them to a trash. I will be surprised if your Webmin browser gui works with a trash. It likely does not. So your remove operation effectively removed the files definitively, just as if you would have removed them using the rm command over ssh.

As you found out, you effectively can find the Trash under the user's .local/share/Trash. However, the home folder of the root user, /root normally will have no trash because you should not run any graphical file manager directly as root.

Harsh Jadon avatar
br flag
ohhk, i understand it ...thanks for the elaborated explanation, though i requested a backup from my hosting provider and they restored the server.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.