TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Suicide Linux

272 点作者 cgtyoder超过 7 年前

34 条评论

kingvash超过 7 年前
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 未加载
sp332超过 7 年前
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 未加载
lloeki超过 7 年前
&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 未加载
cryptonector超过 7 年前
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 未加载
siegelzero超过 7 年前
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 未加载
Bromskloss超过 7 年前
&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 未加载
kbenson超过 7 年前
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 未加载
odammit超过 7 年前
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>
bmiller2超过 7 年前
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 未加载
sova超过 7 年前
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.
abtinf超过 7 年前
Perhaps a better name would be Roguelike Linux.
tekstar超过 7 年前
a less destructive version of this is to install `sl` on your linux or mac.
评论 #15563661 未加载
评论 #15563060 未加载
评论 #15564058 未加载
评论 #15563320 未加载
评论 #15564822 未加载
评论 #15563365 未加载
htfy96超过 7 年前
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 未加载
Viper007Bond超过 7 年前
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>
johnvonneumann超过 7 年前
My team is considering running this in Production. Do you offer support contracts?
gumby超过 7 年前
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)?
waterhouse超过 7 年前
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.
stevefan1999超过 7 年前
We should call it Russian Linux: just like how you would like to play a Russian Roulette.
Bromskloss超过 7 年前
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>
mar77i超过 7 年前
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.
blackflame7000超过 7 年前
Some like to learn by the stick, while others by carrot. And some like to learn with a grenade.
anfractuosity超过 7 年前
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 未加载
b3lvedere超过 7 年前
A bit too unforgiving for my taste :) To err is .. destruction!
PascLeRasc超过 7 年前
Shouldn&#x27;t this be more accurately called Seppuku Linux?
SAI_Peregrinus超过 7 年前
He seems to have forgotten the --no-preserve-root flag.
评论 #15563401 未加载
agumonkey超过 7 年前
not enough, I want a 5 seconds timer on every new attempted input line. You either type something or you don&#x27;t.
ocschwar超过 7 年前
THis is not nearly as hard corre as it would have been in the days before Xen.
z3t4超过 7 年前
Good to have snapshots (zfs) that you can go back to after a screw-up.
评论 #15568317 未加载
rcthompson超过 7 年前
Is this the digital equivalent of corporal punishment?
hsnewman超过 7 年前
Is this a package or a true operating system distro?
RoutinePlayer超过 7 年前
I just wasted 2 minutes of my life reading this.
red75prime超过 7 年前
Docker image? It completely defeats the thrill.
aquamo超过 7 年前
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>:-)
ryanpcmcquen超过 7 年前
What a fun OS!