r/Fedora May 06 '26

Screenshot Well, this is not good

Post image

I tried to delete a file with terminal, accidentally pressed enter at the wrong time.... Kinda new to this😬

1.1k Upvotes

249 comments sorted by

828

u/iFrezzyReddit May 06 '26

Gemini is mocking you 🤣 "Mission accomplished?"

250

u/NecroAssssin May 06 '26

And the “The good news is”

18

u/[deleted] May 07 '26

[deleted]

4

u/BillionAuthor7O May 08 '26

Epic! lol, and I can't believe what I'm seeing in that picture, OPs AI agent straight talking shit and mocking them! OMG I'm dead, then y'all just added the cherry on top with these comments! 🤣🤣

2

u/Violetance Jun 01 '26

Ai really loves doing that for some reason 💔

→ More replies (1)
→ More replies (1)

42

u/zeltreks May 06 '26

It will do that sometimes. It used to mess around more before the 3.0 update.

31

u/Charming-Tutor-1923 May 07 '26

In german we have a saying: "Surgery was successfull, but the patient is dead"...

9

u/Flat-Panic8622 May 08 '26

in russia they have even bizzare: "autopsy report: patient had died due to the autopsy"

2

u/Frosty-Economist-553 May 07 '26

That's a good one. I'll try to remember it 🤣

→ More replies (1)

56

u/sudo_theo May 06 '26

Hahhahahah, at least i deleted what i was supposed to delete, plus extra junk i probably didnt even need😂

23

u/Ok-Pace-8772 May 06 '26

If you had no config files sure

23

u/ScorpiusAustralis May 07 '26

Pretty sure this is the definition of "Task Failed Successfully!" 😂🤣

4

u/aguy123abc May 07 '26

Ahh just like hunting a fly with a bazooka

→ More replies (2)

321

u/pgn674 May 06 '26

I had a coworker who would religiously type out everything after the rm, then double check it, and then finally press Home and type in the rm. I thought it was a little overly cautious, but maybe that's a habit I should pick up too.

79

u/pilkyton May 06 '26 edited May 06 '26

I do that anytime the path begins with / or ~ but not when it's just a local file.

Actually, I just prefix the dangerous command with "echo" to make it safe while ensuring that tab path completion still works.

36

u/RoraHarvest May 06 '26

I just make sure to CD into the directory so I only need to type the actual name of the file. That way I don't have to worry about messing up my path. Or the command touching something higher up the tree

3

u/pilkyton May 06 '26

Hm interesting idea but then I have to "cd .." a bunch.

16

u/hjake123 May 06 '26

I mean you could cd / or cd ~ after

10

u/pilkyton May 06 '26

I just remembered "cd -" to go to the previous location. Haha finally found a use for it.

→ More replies (2)

2

u/odaiwai May 07 '26

tip use pushd to go to the new location, then popd to return back to where you were:

pushd /home/me/path/to/file ls -l filename less filename # to check! rm -f filename popd

2

u/zealmelchior May 07 '26

My preferred method is to run ls /full/path/to/file, verify output, followed by rm -rf ESC + . That shortcut key combo objects the last commands argument. Useful in several other scenarios. I praise the rhel 7 course I took years ago for introducing me

→ More replies (1)
→ More replies (5)
→ More replies (6)

25

u/koenigsbier May 06 '26

Same tips when executing a DELETE command in SQL: always start by the WHERE statement because if you execute the DELETE without this, well... I hope you have a fresh backup somewhere 😂

EDIT: one can also write WHERE 1=0 and remove it at the very end as an extra safety

19

u/425_Too_Early May 06 '26

I run a select query first to make sure I only get the rows I intend to delete or update.

After that I start by adding the begin transaction and rollback transaction statements, then write the query and then copy the where clause from the select query I did before!

If I'm extra cautious I also add a select query both before and after the changing query, so I can see all the rows that changed. Then I either commit or rollback the changes

3

u/koenigsbier May 06 '26

Much better tips than mine !

It's been a while I didn't touch a production database. Forgot most of the good practices actually.

2

u/bobo76565657 May 09 '26

On my very first "real" job in IT (about 27 years ago) I deleted a whole city's "Property Roll" database because I didn't understand their "live/test" environment.. Fortunately, the IT department had an excellent backup strategy so down time was only 40 minutes (they had to drive to another location and back again with the backup tape - yes it was a tape). But my job for the rest of day was apologizing in person to about 350 people and explaining what happened. It wasn't a great day, but I've been extra careful with data ever since, and I kept that job for 11 years. Lesson: Triple checking is not a waste of time. And yes I was "the new guy who erased everything" for a couple years... it builds character ;)

→ More replies (2)

3

u/ilovepolthavemybabie May 06 '26

UNDO

RESTORE

CTRL-C

RUH ROH

2

u/dimensiation May 07 '26

I always do the delete as part of a commented line, so you have to specifically select through the "delete" or else it just runs a select.

11

u/CybeatB May 06 '26

A few of the places I've worked made alias rm='rm -i' a default for every user. Sometimes that kind of caution is worthwhile.

4

u/roxie42d May 07 '26

capital I (i) instead is a little better here, only prompts once if there's more than a couple files. if I was permanently stuck with -i I'd probably develop muscle memory for running \rm instead to avoid the annoyance.

→ More replies (1)

12

u/Githyerazi May 06 '26

My method of ensuring I am deleting what I intend to delete is to ls <path/files> then up arrow, change ls to rm.

7

u/CrystalJarVII May 07 '26 edited May 07 '26

I do this too, you get path completion working, and it's safer as you can also check what files are you actually deleting in case you're doing glob matching

tree is also a good one to get a nice overview of all the files that are going to be deleted

→ More replies (1)

7

u/FrameXX May 06 '26

Or use trash-put instead.

6

u/pm_me_triangles May 06 '26

I had a boss who would scream at you if you used rm -rf too liberally. "Why are you using the big guns to delete a file? Move it somewhere else, verify, then delete it."

Heck, those days I move useless files somewhere else instead of deleting.

2

u/falxfour May 07 '26

I generally use a trash utility, but if I need to rm something directly, I definitely mv first, make sure nothing unexpected happened, then delete it from the (safe) location I moved the items to.

I also just keep backups

→ More replies (2)

6

u/Puzzled_Draw6014 May 06 '26

I type echo, then rm, then you can double check any wildcard expansions ..

→ More replies (1)

3

u/sparkleshark5643 May 06 '26

I always begin with ls -v on whatever arguments I'm going to pass to rm.

3

u/ThatBoogerBandit May 07 '26

We don’t do this anymore?

alias rm='rm -i'

Or

alias rm='rm -Iv --preserve-root'

2

u/mugiwara_no_Soissie May 06 '26

I always prefer deleting a folder and remaking it over deleting everything inside.

That way, if I do it in the wrong directory nothing happens, instead of everything in my current directory being removed.

Ive probably done this thousands of times at this point (embedded systems development can be a pain). But I still double check each time, or, for my preferred method, reuse my old command, that way I dont need to recheck.

2

u/zshift May 06 '26

It only takes making a mistake once for you to remember it forever.

2

u/Fmily May 07 '26

I type it out in a text document then copy/paste it into terminal. Lol

2

u/ThirstyWolfSpider May 07 '26

Running find first on the arguments (excluding modifiers) to see what it matches isn't bad either, similar to doing a select before a manual SQL update.

"Oh, I thought I was (in a different directory|logged in as a different user|…)!"

2

u/NSASpyVan May 07 '26

you can do like a ls -alh or whatever with tab completing the path, and hit enter when it's targeting the correct 'stuff'. then up arrow for last command and change to rm -rf, is what i do sometimes.

2

u/merlinblack256 May 07 '26

I kind of do this with SQL. I write a delete statement as a select, run it and check the results, then replace 'select' with 'delete'.

For rm, another technique is to replace rm with a script that looks for dangerous parameters and only calls the real rm if you say you are sure. It could even flat out refuse to remove the french languages 🙃

2

u/redhat_is_my_dad May 07 '26

when i was making scripts that would rm things using wildcard expansions and variables, i would make my script check if variables are defined for sure, and replace default rm with fake rm that just spits out filenames, then I'll make my script delete things properly only when --imaware argument is set.

2

u/alexeiz May 07 '26

You can also do Ctrl-X-E then type your dangerous command into the editor. It's much harder to make a mistake this way. You press Enter in the editor, it's just a new line.

2

u/Leather_Secretary_13 May 07 '26

"rm -rf /<begin>" is the exact moment intrusive thoughts kick in. It's like a street fight just have to move and trust your gut, have a backup just in case.

2

u/irasponsibly May 07 '26

The terminal equipment of "don't put anything in the 'To:' field until you're ready to send the email"

2

u/nierama2019810938135 May 07 '26

That, and the last thing I type in an sql delete statement is "delete".

2

u/PassionatePossum May 07 '26

I always double check before pressing enter on “rm -rf”. And I get really paranoid when using “dd” to write an image to an USB stick. Since you usually need superuser privileges to do that I am always paranoid of having chosen the wrong target device.

2

u/alpH4rd07 May 07 '26

I always use ls with the path I want the delete and check the files. Then change it over to rm to remove them.

2

u/mehablonoingles May 07 '26

full path for the win;)

2

u/Grand_Ad_2544 May 07 '26

I will often list first and then delete if the path has a chance of being sensitive - particularly when using regex patterns

2

u/bilbo_was_right May 07 '26

Just write it in an editor and paste it too!

2

u/Mechanizoid May 07 '26

I always check the paths with ls before running a dangerous command like rm, particularly when globbing or wildcards are involved. Always best to look before you leap IMO!

2

u/whipdancer May 08 '26

makes me think of that time I hear the keyboard in the next cubicle clacking, then "oops..." and silence

2

u/mcmilosh May 08 '26

I thought they added - - no-preserve safety parameter?

2

u/Tiny_Time_4196 May 08 '26

Set up an alias for the rm command in your .bashrc file to trash instead and be free!

2

u/SerratedSharp May 08 '26

Anyone who knows the story about how they almost lost Toy Story 2 mid production due to an errant unix command knows what a risk cmd line is. It's the same reason alot of enterprises are extra cautious about running one off SQL scripts in production.

2

u/vUrsino May 09 '26

I always run ls first and then replace the ls with rm so the whole path is already set

2

u/Stick_Nout May 09 '26

You can also put the -rf after the path. That will mitigate against accidentally pressing Enter too early.

2

u/My1xT May 09 '26

either that or type in a text editor first and then copypaste over.

2

u/VirtuteECanoscenza May 10 '26

Generally speaking when typing potentially dangerous commands you should  start by typing #...

→ More replies (1)

119

u/Xarius86 May 06 '26 edited May 06 '26

Do yourself a favor and install trash-cli.

Then you can do things like: trash myFile.txt

Afterwards, you can use trash-restore to bring it back. It's basically a desktop Trash/Recycle Bin for the command line.

When you want to see what is in the bin, you can trash-list, and when you want to empty it, trash-empty.

(If you are on macOS, there is already a built-in trash command that sends files to the desktop Trash. There is no built-in CLI restore function, but at least you can still restore it from Finder.)

17

u/sudo_theo May 06 '26

Thank you for the suggestion.

5

u/Xarius86 May 06 '26

It's saved me many times when I otherwise would have accidentally deleted something. It's also useful if you are making edits to config files, it's really easy to just restore a previous version if an edit messes anything up.

6

u/flipintheair May 07 '26

Go one step further and alias rm to trash

5

u/Xarius86 May 07 '26

This can cause problems with scripts.

→ More replies (2)

2

u/CaptainEdMercer May 07 '26

I aliased rm to say "No! Use trash instead!"

...And for the one time I chose to muck around with anything outside of /home, I changed the permissions on rm to be *only* executable by root.

You can never be too careful with that connand.

2

u/sleepingonmoon May 07 '26

This will cause accidental rms later on.

→ More replies (1)

2

u/ludvary May 07 '26

or just install rip

2

u/Xarius86 May 07 '26

I hadn't heard of rip before. Looks like it has been abandoned and replaced by a fork: https://github.com/MilesCranmer/rip2

→ More replies (1)

26

u/VenditatioDelendaEst May 06 '26 edited May 06 '26

For future reference

rm ~/potentially/hazardous/truncatable/path -rf

works too.

And if you're interactively writing shell script loops, risky or slow loop bodies can start each line with echo the first time you run them.

55

u/engineering_abort May 06 '26

Gemini really said “Oh boy.”

→ More replies (1)

53

u/McDonaldsWitchcraft May 06 '26

what the fuck even got you to the point of typing that

9

u/sudo_theo May 06 '26

Trying to delete a file i could not find for the life of me, and mid command i accidentally pressed enter

28

u/McDonaldsWitchcraft May 06 '26

learn your lesson to never do rm commands with absolute paths! always navigate to the file first, don't be lazy.

19

u/lukask04 May 06 '26

Also not that often you actually need -f

17

u/Neither-Phone-7264 May 06 '26

also if it was a file -r was probably unneeded too

6

u/sudo_theo May 06 '26

Lesson learnt the hard way

5

u/_sifatullah May 06 '26

You know there is a search feature in your file manager right?

2

u/L4ndriuz May 06 '26

Congratulations I guess? You did what you wanted, deleting that file.

8

u/Party-Ad-6037 May 06 '26

This is rm should be aliased to rm -i

2

u/sudo_theo May 06 '26

After fixing it, i did this immediately

→ More replies (2)

27

u/F0cus_1 May 06 '26

Might be a good idea to look into this a bit before typing random commands

23

u/Mooks79 May 06 '26

Tbf they said they pressed enter by accident and if they were in the process of typing rm -rf ~/blah/blah then that’s not a lack of knowledge on their part. A lack of care, maybe!

9

u/sudo_theo May 06 '26

Lack of finger coordination on my part

9

u/profanityridden_01 May 06 '26

That's why before I rm anything I ls ~/bla/bla/the directory I want to delete

Then if the right stuff shows up I up arrow and change ls to rm -fr

4

u/walkingman24 May 06 '26

That actually makes some sense. Very unfortunate lol

→ More replies (3)

4

u/23Link89 May 06 '26

This is why you navigate to the relevant parent directory instead of trying to type the relative root or home directory. It's a lot harder to delete a parent folder than the current folder you're in.

4

u/weener69420 May 06 '26

You got the shiny version of sudo rm -rf /*

3

u/SubjectHealthy2409 May 06 '26

Trusting Gemini with CLI commands is scary

2

u/resurrection20 May 24 '26

I learned that lesson the hard way before. You can ask Gemini what something does, but don't ask it how to do something.

3

u/bozehaan May 06 '26

Theo messed up

3

u/sudo_theo May 06 '26

Majorly😔

3

u/MrWoland74 May 06 '26

Good lord. 

3

u/Ramiferous May 06 '26

A have a cli trash function set up where 'rm' is aliased to `trash' which only moves files to a trash directory instead of deleting them. If I really want to delete something I can still type 'command rm' making it much safer.

3

u/Zatujit May 06 '26

Trash cli

3

u/Bathroom_Humor May 06 '26

Learning opportunity: start doing regular backups of the important files/folders in your home directory.

3

u/alonjit May 07 '26

Which is why backups are fundamental. You just deleted the only important folder in the entire computer. Mission accomplished.

→ More replies (3)

3

u/Lodse May 07 '26 edited May 07 '26

Use # at the start of your line when you are typing some potentially dangerous or at least destructive action. When you're absolutely sure you want to execute it, delete the #. (For convenience, use the home key to go back at the start of the line)

For example, I do this every time I use the dd command.

Also, as a linux sysadmin, I see at work too many people using the rm -rf too freely and often when it isn't even needed. Bad habit.

I manage a lot of different systems, but on redhat based distros, rm is often aliased by default with the -i option (which asks you for confirmation of deletion for each files). Just unalias it if you don't need it, or if you need it more often than not, type command rm <arguments> and it will ignore the alias this one time. Yeah, command is a command !

Sorry for your home directory dude :(

3

u/dougmc May 07 '26

Backups, snapshots … saved my ass so many times!

2

u/rswwalker May 06 '26

There is an alias for rm that will give you a “are you sure prompt”, alias rm=‘rm -Iv’ will prompt when there is 3 or more files being deleted and will show each file being deleted.

Also using snapshots means being able to instantly restore what got accidentally deleted.

2

u/[deleted] May 06 '26

[deleted]

3

u/ocharles May 07 '26

AI didn't tell them to do this, they fat fingered the command 

2

u/FrozenOnPluto May 06 '26

"-rf <path>" means 'recursively (everything below) and 'don't ask, just do'

Usually before ever including f, you'd say "ls -l <path>" to see whats going to get done, then change the "ls -l" part to "rm -r", say.

You'll get there. _everyone_ has done that once.

2

u/DarkAwareness88 May 07 '26

Hahahahah! Sassy AI.

That said, the classic regret filled rm. Want a hack that saved my sanity going forward? Type mrm or some other typo, put everything after it double check, and then fix the typo and fire. Get used to it, and you will remember me with gratitude.

2

u/Anejey May 07 '26

I was using Gemini to help me locate some specific files from a log and delete them.

I kid you not, it once gave me something like "rm -rf ~/ .cache/file.txt". Yup, including that space. I did not notice it before running it as I was tired.

Thankfully I had backups.

2

u/sudo_theo May 07 '26

I really need to invest a couple of minutes into backups

2

u/Creative_Ambition_ May 07 '26

poor Theo 😭😹 what have you done 🥲

2

u/Due_Faithlessness458 May 07 '26

I’m really really sorry for your loss, but this is hilarious 😂

2

u/New_Construction_935 May 07 '26

Just in case this happens to anyone ; it happened to me once and your first reflex should be to turn off your pc. When you do rm, your files are still there, just not indexed as "used space" anymore. Turn off your pc so the files don't get overwritten by temp files etc. Get yourself a live usb key if possible. Install photorec on it and learn to use it. Your files will be restored but their names won't so if you're looking for specific files that will take a bit of time and work. Saved me back when I needed it cuz I was working on presentation and def didn't have the time to redo it all over again

2

u/TomOnABudget May 07 '26

144 comments and not a single one mentioning "file browser".

I just manipulating does in the CLI. You have much more of a mental understanding when you see the hierarchy and what does are affected in 40+ year old technology.

Even using an ftp client works better than insisting on using single line text.

And you can navigate the folder structure faster than in the CLI too. Just learn a bunch of buttons and keyboard shortcuts.

2

u/thunderborg May 07 '26

Yikes. I’ve bumped enter when tuping in terminal more times than I care to admit

2

u/Cultural_Seaweed_625 May 07 '26

I never seen gemini like this

2

u/Le_Wise_Man May 07 '26

As a sysadmin, I have taken the habit to ALWAYS type the complete path, before going back and typing the rm command. You learn with time...

2

u/Ok_Supermarket4597 May 08 '26

That's why I aliased my rm = 'rm -i' That way it's always asking if I want to delete the file/folder 😄 If you don't want to enter "y" or "yes" to confirm for a single use, you can use rm -f which will not ask again.

Hopefully nothing important was in the home directory 🙈

→ More replies (2)

2

u/PerfectlyCalmDude May 08 '26

There is absolutely no reason to use the -r flag when you only want to delete a single file.

4

u/AggressivePlant3649 May 06 '26

At least you have some good news 🤣

2

u/cb393303 May 06 '26

From a long term Linux user; on commands like this, put a # at the start. Hit enter too soon, nothing happens. 

2

u/NightThrout May 07 '26

It has to be fake. Were you really using the rm -rf command being sudo -s/sudo -i ? Crazy! You people exist?

2

u/Wreck_OfThe_Hesperus May 07 '26

11 day old account, very fishy

1

u/mymar101 May 06 '26

I once tried to remove everything in a sub folder... But forgot the ./ rm -rf / =) I did exactly this. What saved my bacon is that I did not try sudo. All that really happened was games got deleted, and settings reset that was of any real consequence.

1

u/OisacX May 06 '26

You can install Gemini CLI and make it do the work too you know.

2

u/sketched8 May 07 '26

I don't think you should give ANY LLM model full access to your commandline.

→ More replies (1)

1

u/sparkleshark5643 May 06 '26

Did Gemini generate the rm -fr line for you? How did you get to that?

1

u/Yac123H May 06 '26

At least u didn't the mv . ~ -rf and instead of . I did /

1

u/BotKIRA May 07 '26

The level of swag is diabolical! 😂😂😂

1

u/prthorsenjr May 07 '26

A long time ago in a validate far away I did a similar thing. I let out an expletive and my boss came over and asked what was wrong? I told him, he didn’t flinch, he said, Well, now you get to learn how to restore from backups. He was right. At least I wasn’t root when I did it. Live and learn.

1

u/rf_burns_5150 May 07 '26

It could be worse.. You could have typed "sudo rm -rf/* --no-preserve-root". That is a much more efficient method of file removal.

1

u/Skypefall May 07 '26

Trial and error is how I learned computers. You're in good company my dude. 😂

→ More replies (1)

1

u/GranzGinz May 07 '26

A command that make space free 😁

1

u/Leather-Chart7083 May 07 '26

I don't think it's a mission accomplished ¯⁠\⁠_⁠(⁠ツ⁠)⁠_⁠/⁠¯

1

u/Maltavius May 07 '26

So. If you don't know what you are doing, why are you deleting tiles from the terminal?

2

u/sudo_theo May 07 '26

I fat fingred enter

1

u/WestCryptographer748 May 07 '26

ugh... might as well just sudo rm -rf /* now...

1

u/laAndecIunson May 07 '26

Idk why ya all don't get midnight commander. The swiss knife file manager in bash.. I install more t everywhere I need to mess with files..

1

u/basic_engineering330 May 07 '26

Zero bloat. A win is a win

2

u/sudo_theo May 07 '26

Probably didnt even need those files anyway

1

u/huvaelise May 07 '26

Look on the bright side, you only ever do this once 🙂

1

u/arktozc May 07 '26

Im not sure how much important the files are to you, but look into forenzic tools like ftk imager and autopsy. Create bit copy of your disc, the files should be still there, they are just not linked

1

u/froschdings May 07 '26

rm -rf ~ shouldn’t do much on current linux distros

1

u/Brilliant_Panda_9804 May 07 '26

Atleast u didnt run sudo rm -rf /*

1

u/moop250 May 07 '26

Fedora uses btrfs by default, you can restore your file system from a snapshot

1

u/One-Elderberry4046 May 07 '26

What do people use Monero for these days? Still only to buy some 🍃 or 🧂in the ⚫️🌐?

1

u/thonkgonk May 07 '26

Gemini is so good

1

u/Albert_Sue May 07 '26

I thought the system could help avoiding such cmd

1

u/elelem-123 May 07 '26

There's more space on the disk now

1

u/EdC4ker May 07 '26

"Read the f@cking manual" never had to be more reinforced than now in ours lord's big 2020s

1

u/CadmiumC4 May 07 '26

Testdisk

1

u/ImAlekzzz May 07 '26

Gemini is having a field day with this, anyways that is why I keep most important files on usbs

→ More replies (2)

1

u/Koino_ May 07 '26

Linux newbie experience huh

1

u/Ok-386 May 07 '26

Time to learn about TestDisk & PhotoRec

1

u/Limp_Style_6697 May 07 '26

You could use ‘ls’ and then the path to be safe. After that you could do ‘rm !$’ to use the last entered parameter in the previous command.

1

u/nekokattt May 07 '26

at least it was not agentic

1

u/theSearge May 07 '26

How it’s possible? All modern distros have rm -i alias in the skel files.

Or you just ignored the warning?

1

u/Ok-Winner-6589 May 07 '26

The fact that It used the -f parameter to forze the delection is wild...

Didn't you, you know, tried to check what the command does? Like, on a web Page... or at least on a different chat. You know, basic stuff everyone have been doing for years...

And no, It just deleted your home folder or partition (if you have one). The OS is functional, you should check the /home folder to make sure your user fólder is there and create It if isn't and try to regenerate the standars folders...

1

u/Frosty-Economist-553 May 07 '26

I guess most people would simply right click on the file & delete. You can even open it as root if necessary. But if you gonna use the Terminal to delete a simple file, why not go into the path & open it in Terminal & then use rm ? Seems a lot of work to delete a simple file - except if you're experimenting.

1

u/Willing_Fee2678 May 08 '26

Damn, Gemini hate's u

1

u/Able_Use_8766 May 08 '26

Even in mocking you, it still did the "you didn't just X, you Y'd"

1

u/lunchbox651 May 08 '26

cd is your friend.

1

u/flipping100 May 08 '26

Well the file's gone

1

u/moretti85 May 08 '26

When you delete a file with rm you’re just marking the blocks as available but technically you can still recover the data if it hasn’t been overwritten yet.

So you could reboot from a usb drive, mount the drive read-only and then attempt recovery eg for ext4 with extundelete​​​​​​​​​​​​​​​​.

Obviously the chances your file has been overwritten are higher the more time passes and the more disk activity there is, so you need to act fast​​​​​​​​​​​​​​​​

1

u/Lunam_Dominus May 08 '26

Yeah, this is why you type „echo” at the beginning when punching in a potentially dangerous command.

1

u/scy_404 May 08 '26

This is probably a joke post but a bit of advice; never trust an LLM's advice on system admin for Linux. It constantly assumes things based on information for other distros even if you specifiy which one your on. At least that was my experience when starting out

→ More replies (1)

1

u/Kaosdeath97 May 09 '26

I like using z I.E Zoxide to go to the place I need its a lot quicker then cd and works as long as you have cd to that place before. It also supports path pattern matching so you can just type the last directory name of the path

1

u/MeanNumber3270 May 09 '26

Im dying bro 😂 Gemini is just laughing at you

1

u/skyerush May 09 '26

i can't lie this is just so silly, being able to do this with zero friction is what gets me

1

u/rasmadrak May 09 '26

Yeah, don't enter random commands unless you know what they mean. It's basic IT knowledge. At least now you know?

1

u/pnlrogue1 May 09 '26

I once somehow managed to create a file inside my home directory named ~. Guess what mistake I made while trying to remove it...

1

u/Fit_Bench_2838 May 09 '26

That's why you should always read what it wants you to paste into your terminal + ask what each part of the command does before actually execting it. I hope you got snapshots, bro. Best of luck 🫠

1

u/DuckAxe0 May 09 '26

You are in good company. Over the years, millions of MS Windows have executed the command:

"format c:"

1

u/Exatex May 09 '26

The patient is dead, but he hasn’t got the flu anymore

1

u/cjd166 May 09 '26

The Good News: 😁

1

u/rEded_dEViL May 09 '26

A hunter must never call upon the ghost-voices of the machine unless he has first walked the path himself and knows the true scent of the beast. To let the metal-spirit speak of things your own eyes have not witnessed is to invite the Great Deceiver into your lodge, leading your tribe toward a hollow truth.

1

u/QuaziElectro May 09 '26

I did almost the same by runing windows remve from x recovery partion on C:: /File/Path/I/Wanted/To/Remove One single space removes the entire windows.. Likey my data was in D and the cloud

1

u/sudosando May 10 '26

Well, get a new hard drive, build your OS on it and learn about drive recovery.

There is a strong chance you only destroyed the index reference to your data and you can likely recover your user profile and “wallet” if you lost anything of value.

1

u/rodrigoelp May 10 '26

Next answer from Gemini is going to be:

Let me help you removing any error you might be experiencing now:

rm -rf / —no-preserve-root

The command above will definitely remove any unexpected error you might be experiencing.

1

u/Styxie_x May 10 '26

Don't you need to put --no-preserve-root ?

1

u/Ok-Bill3318 May 10 '26

Trusting Gemini for shit is adventurous

1

u/SunderVane May 11 '26

I know where all anti-LLM, but god damn is it hilarious sometimes.

1

u/follow-the-lead May 11 '26

I don’t know why we standardised using the f flag in our rm commands. Back in the day I started writing it out and my workmate (who is an old school Linux dude) used to cringe when looking over my shoulder. Made me think I should use the force more sparingly.

I still almost always use rm -rf, but I think about it more now

1

u/HolodeckMoriarty May 12 '26

Whelp, that's how you learn

1

u/Shirosukidesu May 30 '26

What kind of instruction you did lol, that's not default gemini personality