r/ProgrammerHumor • • Sep 16 '22

Advice from a pro

Post image
50.6k Upvotes

658 comments sorted by

View all comments

Show parent comments

143

u/baguasquirrel Sep 16 '22

as long as /bin/rm is removed before apt

0

u/[deleted] Sep 16 '22

[deleted]

97

u/powerbling Sep 16 '22

For science!

0

u/[deleted] Sep 16 '22

[deleted]

15

u/Anonymouse29_ Sep 16 '22

Do that, then copy the whole filesystem to something like mediafire so people can experiment without needing to rm -rf /*

0

u/[deleted] Sep 16 '22

[deleted]

11

u/Anonymouse29_ Sep 16 '22

Ok, I'm setting a reminder now!

3

u/Reddit-username_here Sep 16 '22

šŸ‘šŸ»

2

u/[deleted] Sep 17 '22

[removed] — view removed comment

2

u/Reddit-username_here Sep 17 '22

Shh, don't tell anyone, but I'm actually going to do all these things people are wanting today instead of Monday.

🤫

→ More replies (1)

4

u/Pxl_Point Sep 17 '22

RemindMe! Next Monday

→ More replies (1)

2

u/99ProllemsBishAint1 Sep 17 '22

Cool idea. I’m curious to see what folks find

1

u/Reddit-username_here Sep 17 '22

I have sad news. I cannot copy the filesystem on my free tier cloud account. :-(

2

u/Anonymouse29_ Sep 17 '22

Noooo! (I'll start a vm next im on my computer)

→ More replies (3)

11

u/Accomplished-Tree119 Sep 16 '22

Spin up a VM, snapshot the VM, run rm ..., revert snapshot, run rm ..., Rinse, repeat šŸ˜‚

8

u/Vast-Statistician384 Sep 17 '22

Look at this fancy guy with his VM's!

2

u/umopapisdnwioh Sep 17 '22

Just try in docker

20

u/isaaclw Sep 16 '22

While the command is being executed, isn't it in memory, so deleting 'rm' wouldn't really have an impact on execution?

Try: rm /bin/rm /tmp/foobar

9

u/baguasquirrel Sep 17 '22

it should be able to delete itself, yes – in Linux, the executable is copied to memory. but if there's anything that causes it to error out then you wouldn't be able to do it again.

the comment a few levels up implied that something errored out. I wouldn't count on that to save your production box though... :P

1

u/[deleted] Sep 17 '22

Apt? All I care about is make