TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Suicide Linux

272 pointsby cgtyoderover 7 years ago

34 comments

kingvashover 7 years ago
I&#x27;ve added a counter (of successful commands in a row) to my bashrc. I&#x27;ve seen it as high as 120.<p><pre><code> function promptCommand() { LAST_STATUS=$? # Set title of window to dir, then add new line to prompt. PS1=&#x27;\[\e]0;\w\a\]\n&#x27; if [ $LAST_STATUS -eq 0 ]; then ((successes++)) PS1+=&#x27;\[\033[1;32m\][$successes]&#x27; else successes=0 PS1+=&#x27;\[\033[1;31m\][0 $LAST_STATUS]&#x27; fi PS1+=&#x27;\[\033[0;32m\] &#x27; PS1+=&#x27;\w $(date +%H:%M) \$ \[\033[0m\]&#x27; } lastStatus=0 successes=-1 PROMPT_COMMAND=&quot;promptCommand&quot; </code></pre> My prompt:<p><pre><code> [0] &#x2F;home&#x2F;bar&#x2F;g3 14:19 $ echo &quot;boo&quot; boo [1] &#x2F;home&#x2F;bar&#x2F;g3 14:19 $</code></pre>
评论 #15563916 未加载
评论 #15568720 未加载
sp332over 7 years ago
This reminds me of Vigil, &quot;the eternal morally vigilant programming language&quot; <a href="https:&#x2F;&#x2F;github.com&#x2F;munificent&#x2F;vigil" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;munificent&#x2F;vigil</a>
评论 #15565339 未加载
评论 #15564207 未加载
评论 #15566274 未加载
评论 #15567176 未加载
lloekiover 7 years ago
&gt; The reaction from the OS is actually rather underwhelming.<p>Somehow related, a coworker at a previous place unmounted some disks on an old AIX production box. It took him a solid minute to realise he had mistakenly unmounted &#x2F; due to a typo (yes it was possible) as old processes with already opened files were happily serving stuff and only new attempts at opening files were beginning to produce errors.<p>Also, a similar interactive mishap in the heat of the action:<p><pre><code> somebox:~$ rm * .o rm: .o: No such file or directory somebox:~$ # ... somebox:~$ # *stares a prompt* somebox:~$ # Wait, what? _Please_ tell me those C files were versioned! (The answer was, obviously, &quot;no&quot;)</code></pre>
评论 #15567183 未加载
评论 #15566724 未加载
评论 #15565492 未加载
评论 #15563742 未加载
评论 #15566148 未加载
评论 #15566813 未加载
评论 #15563734 未加载
评论 #15566238 未加载
评论 #15567915 未加载
cryptonectorover 7 years ago
On Illumos rm -rf &#x2F; does nothing. POSIX says that removing &#x2F; has undefined behavior, so the obviously smart (useful, user-friendly, GOOD) thing to do is to do nothing, as that fits &quot;undefined behavior&quot;.
评论 #15564418 未加载
评论 #15566624 未加载
评论 #15565251 未加载
siegelzeroover 7 years ago
Reminds me of bash roulette. <a href="http:&#x2F;&#x2F;www.bash.org&#x2F;?96164" rel="nofollow">http:&#x2F;&#x2F;www.bash.org&#x2F;?96164</a>
评论 #15563111 未加载
评论 #15564050 未加载
Bromsklossover 7 years ago
&gt; You know how sometimes if you mistype a filename in Bash, it corrects your spelling and runs the command anyway?<p>What? No, what&#x27;s that about?
评论 #15563892 未加载
评论 #15563591 未加载
评论 #15564205 未加载
kbensonover 7 years ago
Just have to mention, since I recognize the domain, that Sam Hughes has some excellent science fiction freely available in a serialized form here as well. Well worth investigating.
评论 #15564401 未加载
odammitover 7 years ago
This is funny. I think I’ll stick with “thefuck” [1] though.<p>It would make a good prank to set up on someone that left their machine unlocked. Not sure if it’s more funny than changing their background to goatse.<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;nvbn&#x2F;thefuck" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;nvbn&#x2F;thefuck</a>
bmiller2over 7 years ago
In all seriousness, what if it&#x27;s a machine that no one should ever really be running commands on? This could be an effective, albeit naive, way to discourage undesirables in the system.
评论 #15564480 未加载
评论 #15565088 未加载
sovaover 7 years ago
Computers already demand a level of precision that is hard for biological lifeforms to conform to. Now this. Not sure if I should laugh or cry.
abtinfover 7 years ago
Perhaps a better name would be Roguelike Linux.
tekstarover 7 years ago
a less destructive version of this is to install `sl` on your linux or mac.
评论 #15563661 未加载
评论 #15563060 未加载
评论 #15564058 未加载
评论 #15563320 未加载
评论 #15564822 未加载
评论 #15563365 未加载
htfy96over 7 years ago
It would be nice for someone to develop a suicide-g++. Whenever you compile a program that results in Undefined Behavior, the execution of it will wipe your disk.
评论 #15566583 未加载
Viper007Bondover 7 years ago
A good read about recovering a system that had rm -rf * run on it:<p><a href="http:&#x2F;&#x2F;www.ee.ryerson.ca:8080&#x2F;~elf&#x2F;hack&#x2F;recovery.html" rel="nofollow">http:&#x2F;&#x2F;www.ee.ryerson.ca:8080&#x2F;~elf&#x2F;hack&#x2F;recovery.html</a>
johnvonneumannover 7 years ago
My team is considering running this in Production. Do you offer support contracts?
gumbyover 7 years ago
bash corrects your spelling?? Is this a cute way of saying &quot;I made a typo that turned out to be a legit command&quot; or is there some DWIM I don&#x27;t know about (and thankfully don&#x27;t have enabled)?
waterhouseover 7 years ago
In the video, the banner the shell displays says:<p><pre><code> ========================================================= WARNING: Suicide Linx installed (http:&#x2F;&#x2F;sourceforge.net&#x2F;projects&#x2F;suicide-linux&#x2F;) ========================================================= </code></pre> I&#x27;m wondering if the typo is a subtle joke.
stevefan1999over 7 years ago
We should call it Russian Linux: just like how you would like to play a Russian Roulette.
Bromsklossover 7 years ago
Ah, that video! The good old days of Ubuntu! I just installed 17.10. :-(<p>Edit: The video in question: <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=Q_pgnMWgd34" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=Q_pgnMWgd34</a>
mar77iover 7 years ago
One idea I like is randomly flipping a bit on the root partition every day or so. You&#x27;ll have to take an incredibly long time to find the problem, of which there will be one eventually.
blackflame7000over 7 years ago
Some like to learn by the stick, while others by carrot. And some like to learn with a grenade.
anfractuosityover 7 years ago
Haha, how can it do that out of interest, if you&#x27;re not root? (As aren&#x27;t the top level directories in &#x2F; owned by root?, or does it work anyway, if rm can recurse down? deleting files from the current user)
评论 #15563340 未加载
评论 #15563325 未加载
b3lvedereover 7 years ago
A bit too unforgiving for my taste :) To err is .. destruction!
PascLeRascover 7 years ago
Shouldn&#x27;t this be more accurately called Seppuku Linux?
SAI_Peregrinusover 7 years ago
He seems to have forgotten the --no-preserve-root flag.
评论 #15563401 未加载
agumonkeyover 7 years ago
not enough, I want a 5 seconds timer on every new attempted input line. You either type something or you don&#x27;t.
ocschwarover 7 years ago
THis is not nearly as hard corre as it would have been in the days before Xen.
z3t4over 7 years ago
Good to have snapshots (zfs) that you can go back to after a screw-up.
评论 #15568317 未加载
rcthompsonover 7 years ago
Is this the digital equivalent of corporal punishment?
hsnewmanover 7 years ago
Is this a package or a true operating system distro?
RoutinePlayerover 7 years ago
I just wasted 2 minutes of my life reading this.
red75primeover 7 years ago
Docker image? It completely defeats the thrill.
aquamoover 7 years ago
1) death by accident (or rm -rf&#x27;ing) is not suicide 2) has the bar been lowered that much now? a simple bash configuration makes a new O&#x2F;S or distribution?<p>:-)
ryanpcmcquenover 7 years ago
What a fun OS!