Score:0

I accidentally removed everything from my base directory. Is there any way to recover these?

pk flag

After opening terminal I typed

sudo rm -rf * lampp

from my base directory srj@srj. So now I have lost everything in my Desktop and Downloads folder. Can it be recovered in any way. I was trying to remove xampp completely and messed up using the rm and rf.

variona avatar
kr flag
First of all : don't use the disk in any way ... What filesystem did you use? ext3 or ext4? Your best bet to recover individual files will be the use of a live-linux-distro.
guiverc avatar
cn flag
What backup strategy did you put in place? We cannot know such answers, so why ask us?
guiverc avatar
cn flag
Does this answer your question? [How to recover from 'sudo rm -rf' command?](https://askubuntu.com/questions/213950/how-to-recover-from-sudo-rm-rf-command)
in flag
If you are using ZFS, just restore a snapshot. Otherwise, consider this a lesson in the importance of having verified backups in place. Hardware fails and `sudo` commands can bite hard.
karel avatar
sa flag
Does this answer your question? [How to recover deleted files?](https://askubuntu.com/questions/3883/how-to-recover-deleted-files)
Saurav Raj Joshi avatar
pk flag
I am using ext4 filesystem and it seems I did not have any backup strategy. Yes @guiverc I think I'll try to use photorec or testdisk. I tried to install lammp again but by deleting the files why are my permissions messed up. The /opt folder and others have different permissions now, and phpmyadmin is saying incorrect permissions. Is there some file which holds all the permission information and could that have been deleted as well?
waltinator avatar
it flag
Each time you use the disk with your deleted files, each block you write, makes recovery less likely. "Deleting" a file places the disk blocks containing the data (that you want to recover) on the "free blocks" list. When you write data to the disk, disk blocks are allocated from the "free blocks" list.
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.