Everything gone? [SOLVED]

I recently installed EOS Cassini on my trusty work laptop, i moved my Backed up Files into their respective folders and i wanted to clean up the tmp folder so I used the command “sudo rm -rf * /tmp” but then after that my entire home folder got cleared somehow too. Does the home folder connect somehow to tmp? If so I’m gonna need help recovering everything, sure hope i didn’t overwrite much because I also made new folders for everything

EDIT: Good news! I remembered that I have another backup of my files on my phone, had a little bit trouble finding them but I found everything! :smiley:


sudo rm -rf means to recursively delete everything in the list that comes after that.

You then passed two arguments * and /tmp. * would have matched everything in the directory you were in when you ran the command. So it deleted everything in whatever your current directory was and /tmp


That would be a miracle.

@dalto was faster…


I still don’t see how tmp would be connected to home

You must have run that command from within your home directory.

That’s where you normally are when you launch a terminal. The * did the rest.

So I basically cleared 2 folders at the same time?

Is anything left in you home? I guess you must have nuked all the folders and their contents in there? Plus /tmp.

I entered * because I thought that it would delete every file type or any file in /tmp

Sadly nothing, i guess you can recover nothing from rm -rf huh?

In that case, you should have done: rm -f /tmp/*

Also, /tmp is tmpfs so nothing in there should survive a reboot, I guess.


There are data recovery tools as long as you stopped using the system right after you made the mistake they will be pretty effective.

Well not really, because I kinda did and then I installed EOS on a btrfs partition which encrypts stuff. Is it still doable?

If you installed over the data you deleted it is pretty much all gone.

It is also harder to recover data stored with encryption + btrfs. I haven’t used one of those tools in a long time but when I last did that wasn’t supported. The ones I have used read the raw data so if it is encrypted they can’t access it. Although, again, that was quite some time ago.

These days, I aggressively take backups of everything.

So at this point my files are toast? Alright then. Guess I’ll live with my mistake then.

I’ve done similarly stupid things, too. They have taught me about the necessity of keeping a good backup. A painful lesson, but a very valuable one.


oof…you gotta be careful with sudo rm -rf and be REALLY sure what youre doing before you run that.

It happens though, we’ve all made mistakes, just gotta learn from them. Sorry for the loss of data though


It is kinda fine, too sad that i lost a pretty well made powerpoint presentation for my music class and other school files, may these files rest in peace due to my mistake :saluting_face:


1 Like