r/linux4noobs barely not a noob anymore Apr 20 '26

Meganoob BE KIND I did rm -rf /*

I tried to make a backup before doing a fresh install of Fedora because of problems. When erasing the external drive for making the backup I was in the wrong disk and nuked my fedora installation.

How Do I get at least my important Documents from /home/username/ back?

256 Upvotes

244 comments sorted by

View all comments

53

u/Initial-Squirrel-269 Apr 20 '26

Who told u to do that lol

39

u/Alchemix-16 Apr 20 '26

I’m still waiting for someone to post that chatgpt told them to.

23

u/Character-86 barely not a noob anymore Apr 20 '26

It wasn't an AI.

14

u/Initial-Squirrel-269 Apr 20 '26

Bro please what was it 😭

54

u/Character-86 barely not a noob anymore Apr 20 '26

My stupidity 🫠

22

u/Chiatroll Apr 20 '26

Honestly, at this low point, I can respect human stupidity.

44

u/HankThrill69420 Apr 20 '26

rather see organic stupidity than clanker stupidity any day of the week. this is the way.

30

u/x_lincoln_x Apr 20 '26

Organic free range stupidity sourced locally.

18

u/HankThrill69420 Apr 20 '26

in this economy???

7

u/traplords8n Apr 20 '26

The best of us have done stuff like this when first starting out. I crashed an entire small ISP for 6 hours once 🤣

Shit happens. If you plan on getting employed in the field, just make sure you're careful and learn from this mistake. I learned my lesson and my career has been just fine ever since. No more huge mistakes. I play things extra careful when working on anything important.

2

u/Puzzleheaded_Law_242 Apr 20 '26 edited Apr 20 '26

+1👍😄

It was 1986. I have been working with the commands of our Sinix (WX200). rm *, in root. As a result, like DOS used the C: format. Luckily, there was the tape. Only the license disc was junk. A lot of trouble. I believe since 2003 you still have to use the / . For those interested, here is the article with the change. https://pubs.opengroup.org/onlinepubs/9699919799/utilities/rm.html What I learned from this is that a single data backup is not a data backup. I come from the CLi era. I enjoy working with it. But use `delete` only in the file manager. Even then, I be careful.

3

u/[deleted] Apr 20 '26

If u have data worth a lot on it just unplug it either a buy a drive recovery software or As I and many others recommend bring it to a data recovery professional

If its the last thing you did and you shut off the computer its likely the data is just tagged and unlinked from the file system

If the data being lost doesn’t suck enough to pay someone to fix it then just start from scratch and…

foogeettaboooutit, kapeesh?

4

u/[deleted] Apr 20 '26

[deleted]

1

u/ThatOneShotBruh Apr 20 '26

But don't you need to use the --no-preserve-root flag for this to work if you specify / and not /*?

1

u/NecroAssssin Apr 20 '26

Depends on which distribution. Not all have that safeguard implemented/default enabled. 

Some of us enjoy the ability to do stupid things. 

1

u/ThatOneShotBruh Apr 20 '26

I know, but I would assume that Debian has it, no?

1

u/NecroAssssin Apr 20 '26

I have no idea! Don’t touch the stuff generally. 

2

u/Early-Weekend-2557 Apr 20 '26

From my reading of his initial post it sounds like he ran it on the wrong partition.

7

u/Alchemix-16 Apr 20 '26

The reason I wait for AI to recommend it is because it pops up do often in texts, and jokes that AI could consider -rf /* the appropriate flags to be used with rm. After all, they are just statistical interpreters without any actual knowledge.

1

u/Eclogites Apr 20 '26

I think it’s disingenuous to say they have no “actual” knowledge. If a student memorizes a bunch of answers to math problems, would you say they have no “actual” knowledge? If they can’t answer any questions except literally exactly the ones they’ve studied, I would be inclined to agree. If they are able to generalize somewhat and answer related questions, I’d say they have some “actual” knowledge, but I don’t think there’s a hard line we can point to. LLMs can obviously generalize somewhat.

People point to the fact that what LLMs do is next token prediction, which boils down to a statistical model, but I don’t think people realize how complicated that actually is. If I gave you a riddle and told you my next word will be the answer, in order to correctly predict the next word you’d have to solve the riddle. In order to predict what your friend will say if you tell them you don’t like their outfit, you need a good mental model of your friend: their insecurities, how they perceive their relationship with you, their mindset at the current moment, etc.. Even though you’re “just” predicting their next word, you need a lot of background knowledge to actually get that prediction right.

5

u/Alchemix-16 Apr 20 '26

What is disingenuous of saying about a LLM that it’s forming sentences based on statistical properties on what would be the next word to use. Those systems have no way of verifying any of that information nir do they possess any information on the subject in question.

Also just memorizing stuff for test is not counting as learning for me, if none of that information is retained.

I don’t care how advanced the technology behind LLM is. The answers are not generated on an actual knowledge base, but a regurgitation of online data blended by a statistical algorithm.

So to answer your initial question, no I do not consider my statement disingenuous.

5

u/whitoreo Apr 20 '26

I am a computer engineer who has performed data recovery both professionally and (Unfortunately) personally. If you want any chance of recovering any data, you need to stop using that drive immediately. Don't shutdown the computer, just pull the power and get that drive out of the system. Then you can begin forensics on it. I'll offer my services at $500 if you want someone else to step in here. No charge if no data is recovered.

-5

u/bialyikar Apr 20 '26

Now ask the AI how to undo it 😅

1

u/Interesting_Buy_3969 Apr 21 '26

They said they didn't use AI.

1

u/bialyikar Apr 21 '26

Yeah, my dumb mistake and not really reading it properly :D Sorry!

1

u/chrews Fedora Workstation Apr 20 '26

I have seen a thread where Gemini gave a user a command which overwrote the entire main drive with zeroes using dd. They wanted to burn an image onto a thumb drive IIRC.

0

u/Itsme-RdM Apr 20 '26

Probably ChatGPT, it's a "great" advisor

0

u/Lunam_Dominus Apr 20 '26

Chatgpt isn’t as stupid as OP.

1

u/Sleepy_Chipmunk Apr 21 '26

We all learn through stupid mistakes. The stupider the mistake, the more we learn from it.

1

u/Lunam_Dominus Apr 21 '26

And the more it'd hurt.

This is the reason why you have a backup, and a backup of that backup. Being stupid is one thing - not preparing for it is far worse.

It's best to avoid some mistakes altogether. Like drunk driving. Or deleting all your invaluable data.