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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

The Classic Unix Horror Story

19 点作者 theunamedguy大约 10 年前

2 条评论

PeterWhittaker大约 10 年前
I did something similar once, but realized pretty quickly I had been in the wrong directory when I hit return after &quot;rm -rf *&quot; - I cannot remember why I realized so quickly, it&#x27;s been over 20 years, but it seems to me I had multiple terminal sessions going (probably via screen) and freaky stuff was happening in one.<p>If I remember correctly, I was in &#x2F;dev when I meant to be in a sub-directory I&#x27;d created for testing purposes. Some of the freaky stuff included losing command echo, e.g., since my TTY no longer existed.<p>Fortunately, since my work involved backups, modems, and a few other things, I had a pretty good grasp of major and minor numbers and was able to recreate my TTY using mknod. After that, panic dropped considerably and I could at least poke around and figure out exactly how borked the system was.<p>Another time, a colleague and I spent hours trying to restore from tape to a filesystem we were pretty sure was corrupted. We tried every trick we knew - and learned a few more along the way - but eventually, at least in part because we were stressed out and sleep deprived, we had something along the lines of the following conversation:<p>&quot;The FS is borked, right?&quot;<p>&quot;Right.&quot;<p>&quot;We&#x27;re confident the backups are good, right?&quot;<p>&quot;Right.&quot; (We&#x27;d built the backup system, it was in use on hundreds of servers across the company, we&#x27;d never had a failed recovery....)<p>&quot;So let&#x27;s reboot into single user, newfs the disk, restore from tape, and boot back into multiuser.&quot;<p>&quot;Uh...&quot;<p>&quot;I mean, we cannot possibly make things worse, right? This machine is thrashing.&quot;<p>&quot;Yeah....&quot;<p>&quot;So?&quot;<p>&quot;OK.&quot;<p>It worked. When we returned to our senses, we realized we were lucky it had, realized we were deluding ourselves (we could have made things worse), and realized that if it hadn&#x27;t of worked, we would have been fired in all likelihood: We&#x27;d made a decision way above our pay grade, as it were, with no management knowledge at all.<p>The next day, as far as they were concerned, we&#x27;d spent hours slaving after midnight to save a build machine and we kept the design group working. We just smiled, awkwardly.<p>Oi.
gumby大约 10 年前
Nowadays you could sync and then force a shutdown (hard), then mount your drive on another machine. A hard thing to do in the days of vaxes.
评论 #9345697 未加载