Lubuntu: The unwanted delete of all main and sub-folders from Home directory, how to fix
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
My problem is that with deleting all files in the Trash folder the system also deleted all main Folders such as Documents, Downloads, Music, Pictures and so forth. Now I see only Desktop Folder in the window of the Files Manager. Trying to fix, I updated all packages with Muon Package Manager but the problem was not solved. Then, I tried to fix it with DPKG solution from boot menu but Lubuntu doesn't launch it on start. Can anyone help me bringing back Documents and others folders?
The last time I did that, I created a new user, then cp -r the directories to the corrupted user's /home/
Made sure the ownership and permissions were correct for the old user, then removed the new user.
That didn't restore any documents, etc, tho. I had to recover those from off-site backups, but it was important to rebuild the directory structure quickly in my case.
I've since pretty much stopped using the -f option to rm. Yes, I have to acknowledge the deletion of each file, but that's less tedious than recovering lost data...I also backup more frequently (daily!) now
My problem is that with deleting all files in the Trash folder the system also deleted all main Folders such as Documents, Downloads, Music, Pictures and so forth.
may this be a leesson why
a) people giving instructions on forums should be very clear about it, esp. when 'sudo rm' and such is involved
b) one should not copy-paste instructions into one's own terminal without knowing what they do, esp. when sudo is onvolved
Lubuntu: The unwanted delete of all main and sub-folders from Home directory, how to fix
Thanks for replies. I am not sure that Photorec helps. I will try to restore my files from backup I have. But would you please to detail how I should to create a new user, ".... then cp -r the directories to the corrupted user's /home/. Made sure the ownership and permissions were correct for the old user, then removed the new user." Sorry for this inquiry for I am not advanced. Sergeyav
If you lost data, the very first thing you do is STOP USING THE DISK.
Then you boot some Live Rescue Linux (e.g. this one) and let extundelete and/or testdisk/photorec do their thing.
But please read the wiki first.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.