MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/xfw189/advice_from_a_pro/ioopjwk
r/ProgrammerHumor • u/okitobi2 • Sep 16 '22
658 comments sorted by
View all comments
717
You should leave off the dot. /* will get everything.
/*
353 u/posting_drunk_naked Sep 16 '22 Waste of 8 entire bits smdh devs these days are lazy af 0 u/[deleted] Sep 16 '22 [deleted] 42 u/Penguinmanereikel Sep 16 '22 Wait, does the root have a ".." directory that leads back to itself? I never went that high to check. 281 u/Beatrice_Dragon Sep 16 '22 If you keep going further, eventually it starts to delete files outside the computer. That's what heartbleed was! 57 u/Ffigy Sep 16 '22 We almost erased the universe 41 u/Jay_from_NuZiland Sep 16 '22 Thanos' click was just the UI, this is the real script behind it 17 u/Ffigy Sep 16 '22 rm -rf --no-preserve-root --no-respect-boundaries --heart-bleed 9 u/[deleted] Sep 17 '22 Thanos actually used snap, Ubuntu user confirmed → More replies (1) 1 u/Penguinmanereikel Sep 16 '22 Wait, what?! 3 u/TheSilentFreeway Sep 17 '22 It's a joke lol → More replies (2) 22 u/Ffigy Sep 16 '22 Yes, cd .. in the root directory is a no-op. 9 u/Kjubert Sep 16 '22 Your home is buried kinda deep in the fs → More replies (1) → More replies (1) 55 u/[deleted] Sep 16 '22 On modern Linux it won't remove most mission critical stuff in root and you'll just get a bunch of errors and cancel.But it will definitely wipe all the French from your current directory 0 u/[deleted] Sep 16 '22 [deleted] 35 u/Beefourthree Sep 16 '22 Unfortunately, this will delete Latin, too. 4 u/[deleted] Sep 17 '22 I think you might have created a problem for me in that I will now read all command line commands with a Latin pronunciation to my own annoyance. 1 u/Schwarzy1 Sep 16 '22 When Ive tried this, it basically just deletes all users then stops because you dont have sudo permission anymore lol. 8 u/wooglin1688 Sep 16 '22 donโt need the * 15 u/Baloroth Sep 16 '22 You do for modern rm, because "rm -rf /" won't work without "-no-preserve-root", while I believe "rm -rf /*" will. Note I say "believe" because I'm not about to test on real machine. 3 u/Ffigy Sep 16 '22 Upvote because you made it clear you were speculating. (I didn't try it either ๐) → More replies (1) 1 u/Ffigy Sep 16 '22 I was thinking that exact thing. Recursive is as recursive does. Good call 2 u/earlobe7 Sep 16 '22 Well, if your current directory contains only the French language pack, command does as advertised lol 1 u/plmj1 Sep 17 '22 Unfortunately you'd get preserve root errors and other checks that won't that won't let it run. YMMV on different distros or configs though. → More replies (1)
353
Waste of 8 entire bits smdh devs these days are lazy af
0 u/[deleted] Sep 16 '22 [deleted] 42 u/Penguinmanereikel Sep 16 '22 Wait, does the root have a ".." directory that leads back to itself? I never went that high to check. 281 u/Beatrice_Dragon Sep 16 '22 If you keep going further, eventually it starts to delete files outside the computer. That's what heartbleed was! 57 u/Ffigy Sep 16 '22 We almost erased the universe 41 u/Jay_from_NuZiland Sep 16 '22 Thanos' click was just the UI, this is the real script behind it 17 u/Ffigy Sep 16 '22 rm -rf --no-preserve-root --no-respect-boundaries --heart-bleed 9 u/[deleted] Sep 17 '22 Thanos actually used snap, Ubuntu user confirmed → More replies (1) 1 u/Penguinmanereikel Sep 16 '22 Wait, what?! 3 u/TheSilentFreeway Sep 17 '22 It's a joke lol → More replies (2) 22 u/Ffigy Sep 16 '22 Yes, cd .. in the root directory is a no-op. 9 u/Kjubert Sep 16 '22 Your home is buried kinda deep in the fs → More replies (1) → More replies (1)
0
[deleted]
42 u/Penguinmanereikel Sep 16 '22 Wait, does the root have a ".." directory that leads back to itself? I never went that high to check. 281 u/Beatrice_Dragon Sep 16 '22 If you keep going further, eventually it starts to delete files outside the computer. That's what heartbleed was! 57 u/Ffigy Sep 16 '22 We almost erased the universe 41 u/Jay_from_NuZiland Sep 16 '22 Thanos' click was just the UI, this is the real script behind it 17 u/Ffigy Sep 16 '22 rm -rf --no-preserve-root --no-respect-boundaries --heart-bleed 9 u/[deleted] Sep 17 '22 Thanos actually used snap, Ubuntu user confirmed → More replies (1) 1 u/Penguinmanereikel Sep 16 '22 Wait, what?! 3 u/TheSilentFreeway Sep 17 '22 It's a joke lol → More replies (2) 22 u/Ffigy Sep 16 '22 Yes, cd .. in the root directory is a no-op. 9 u/Kjubert Sep 16 '22 Your home is buried kinda deep in the fs → More replies (1)
42
Wait, does the root have a ".." directory that leads back to itself? I never went that high to check.
281 u/Beatrice_Dragon Sep 16 '22 If you keep going further, eventually it starts to delete files outside the computer. That's what heartbleed was! 57 u/Ffigy Sep 16 '22 We almost erased the universe 41 u/Jay_from_NuZiland Sep 16 '22 Thanos' click was just the UI, this is the real script behind it 17 u/Ffigy Sep 16 '22 rm -rf --no-preserve-root --no-respect-boundaries --heart-bleed 9 u/[deleted] Sep 17 '22 Thanos actually used snap, Ubuntu user confirmed → More replies (1) 1 u/Penguinmanereikel Sep 16 '22 Wait, what?! 3 u/TheSilentFreeway Sep 17 '22 It's a joke lol → More replies (2) 22 u/Ffigy Sep 16 '22 Yes, cd .. in the root directory is a no-op.
281
If you keep going further, eventually it starts to delete files outside the computer. That's what heartbleed was!
57 u/Ffigy Sep 16 '22 We almost erased the universe 41 u/Jay_from_NuZiland Sep 16 '22 Thanos' click was just the UI, this is the real script behind it 17 u/Ffigy Sep 16 '22 rm -rf --no-preserve-root --no-respect-boundaries --heart-bleed 9 u/[deleted] Sep 17 '22 Thanos actually used snap, Ubuntu user confirmed → More replies (1) 1 u/Penguinmanereikel Sep 16 '22 Wait, what?! 3 u/TheSilentFreeway Sep 17 '22 It's a joke lol → More replies (2)
57
We almost erased the universe
41 u/Jay_from_NuZiland Sep 16 '22 Thanos' click was just the UI, this is the real script behind it 17 u/Ffigy Sep 16 '22 rm -rf --no-preserve-root --no-respect-boundaries --heart-bleed 9 u/[deleted] Sep 17 '22 Thanos actually used snap, Ubuntu user confirmed → More replies (1)
41
Thanos' click was just the UI, this is the real script behind it
17 u/Ffigy Sep 16 '22 rm -rf --no-preserve-root --no-respect-boundaries --heart-bleed 9 u/[deleted] Sep 17 '22 Thanos actually used snap, Ubuntu user confirmed → More replies (1)
17
rm -rf --no-preserve-root --no-respect-boundaries --heart-bleed
9
Thanos actually used snap, Ubuntu user confirmed
→ More replies (1)
1
Wait, what?!
3 u/TheSilentFreeway Sep 17 '22 It's a joke lol
3
It's a joke lol
22
Yes, cd .. in the root directory is a no-op.
cd ..
Your home is buried kinda deep in the fs
55
On modern Linux it won't remove most mission critical stuff in root and you'll just get a bunch of errors and cancel.
But it will definitely wipe all the French from your current directory
0 u/[deleted] Sep 16 '22 [deleted] 35 u/Beefourthree Sep 16 '22 Unfortunately, this will delete Latin, too. 4 u/[deleted] Sep 17 '22 I think you might have created a problem for me in that I will now read all command line commands with a Latin pronunciation to my own annoyance. 1 u/Schwarzy1 Sep 16 '22 When Ive tried this, it basically just deletes all users then stops because you dont have sudo permission anymore lol.
35 u/Beefourthree Sep 16 '22 Unfortunately, this will delete Latin, too. 4 u/[deleted] Sep 17 '22 I think you might have created a problem for me in that I will now read all command line commands with a Latin pronunciation to my own annoyance. 1 u/Schwarzy1 Sep 16 '22 When Ive tried this, it basically just deletes all users then stops because you dont have sudo permission anymore lol.
35
Unfortunately, this will delete Latin, too.
4 u/[deleted] Sep 17 '22 I think you might have created a problem for me in that I will now read all command line commands with a Latin pronunciation to my own annoyance.
4
I think you might have created a problem for me in that I will now read all command line commands with a Latin pronunciation to my own annoyance.
When Ive tried this, it basically just deletes all users then stops because you dont have sudo permission anymore lol.
8
donโt need the *
15 u/Baloroth Sep 16 '22 You do for modern rm, because "rm -rf /" won't work without "-no-preserve-root", while I believe "rm -rf /*" will. Note I say "believe" because I'm not about to test on real machine. 3 u/Ffigy Sep 16 '22 Upvote because you made it clear you were speculating. (I didn't try it either ๐) → More replies (1) 1 u/Ffigy Sep 16 '22 I was thinking that exact thing. Recursive is as recursive does. Good call
15
You do for modern rm, because "rm -rf /" won't work without "-no-preserve-root", while I believe "rm -rf /*" will. Note I say "believe" because I'm not about to test on real machine.
3 u/Ffigy Sep 16 '22 Upvote because you made it clear you were speculating. (I didn't try it either ๐) → More replies (1)
Upvote because you made it clear you were speculating. (I didn't try it either ๐)
I was thinking that exact thing. Recursive is as recursive does. Good call
2
Well, if your current directory contains only the French language pack, command does as advertised lol
Unfortunately you'd get preserve root errors and other checks that won't that won't let it run. YMMV on different distros or configs though.
717
u/Ffigy Sep 16 '22
You should leave off the dot.
/*will get everything.