fau*_*ver 20
个人最喜欢的一直是“500 英里电子邮件案例”
http://www.ibiblio.org/harris/500milemail.html
剧透
$ units
2411 units, 71 prefixes, 33 nonlinear units
You have: 3 millilightseconds
You want: miles
* 558.84719
/ 0.0017893979
Run Code Online (Sandbox Code Playgroud)
HTT*_*500 11
对我来说,UNIX 传统最令人惊奇的事情是 UNIX 基本上是由一个人编写的 - Ken Thompson 在贝尔实验室时。可以在这里找到一个有趣的说明:http : //www.bell-labs.com/history/unix/
一些报价是无价的:
“我给操作系统、shell、编辑器和汇编器各分配了一周的时间来自我复制……”,汤普森解释说。
管道:
UNIX 的另一项创新是管道的开发,它使程序员能够为特定输出将多个进程串在一起。
这并不容易。“很容易说'cat into grep into...'或'who into cat into grep',”麦克罗伊解释说。“但是这些命令具有所有这些辅助参数;它们只是没有输入和输出参数,但它们具有所有这些选项。”
尽管受阻,麦克罗伊并没有放弃这个想法。“在 1970 年到 1972 年的这段时间里,我不时说,‘做这样的事情怎么样?’然后我提出了另一个提案,另一个提案,另一个提案。有一天我提出了使用与管道一起使用的 shell 语法,Ken 说,'我要去做!'”
“他听腻了这些东西,”麦克罗伊解释道。“他并没有完全按照我为管道系统调用提出的建议去做。他发明了一个稍微好一点的方法,最终又一次变成了我们今天的样子。他确实使用了我笨拙的语法。”
“汤普森看到文件参数不符合这种方案,他在同一天晚上进去并更改了所有这些程序。我不知道如何......第二天早上我们进行了一场狂欢-班轮。”
“他将管道放入 UNIX,他将这个符号放入 shell,一夜之间,”McElroy 惊奇地说。
尽管技术上的成就是精巧的,但当 Thompson 创建管道时,他还在 UNIX 中加入了其他东西 —— 一种哲学。
正如麦克罗伊所描述的那样,“每个人开始提出的理念是‘编写只做一件事的程序并把它做好。编写程序以协同工作。编写处理文本流的程序,因为这是一个通用接口。’”
tar never exits with an error. NEVER. Beware.
Source: The UNIX-HATERS Handbook, page 31 (http://simson.net/ref/ugh.pdf) Sorry, no HTML version.
This book happens to be chock-full of other legendry, and it's mostly still applicable. In my years of using Linux, I've run across many of these gotchas... just not any of the ones involving rm-ing my entire drive, thank goodness. It's stunning to me that so much of this book is still accurate, even though it was written over 15 years ago.
And now my own tar horror story, nearly an exact replica of the UNIX-HATERS one. Same bug, 14 years later!
I want my wireless working on my eeepc, for which I must download a driver, compile it, and install it. I download everything I need, and set off to the library to work. Halfway through, I realize that yes, I DO need the internet for something, so I go to install.
tar -cvf somewirelessdriver.tar ./importantcompilerfiles
Run Code Online (Sandbox Code Playgroud)
Oh, crap. Did I just type -cvf instead of -xvf?
Yup.
tar 是否只是默默地创建了一个随机垃圾的 tar 文件,覆盖了我的可用文件?
是的。伟大的。我想我会在没有互联网访问的情况下做。好在它不是一个多 GB 的文件......哦等等,那是发生在一周前。
老实说,神秘的命令行参数和 linux 程序到底是怎么回事?当在具有适当扩展名的文件上调用时,它们不能自动执行基本操作。为什么在大火中我需要告诉 tar 如何处理 ARCHIVE?它是否认为我可能想再次归档它?
我想我现在终于明白什么是“焦油坑”了。这是一个文件去死的地方。
全部大写登录
http://utcc.utoronto.ca/~cks/space/blog/unix/UnixFossilizationExample
小时。我担心我可能误解了这个问题:-)
但我要离开链接,因为我觉得它很有趣!
肯·汤普森(Ken Thompson)著名的图灵奖演讲:
http://www.ece.cmu.edu/~ganger/712.fall02/papers/p761-thompson.pdf [PDF]
当你login在你的 C 编译器中放置一个后门时,可能会发生令人讨厌的事情......
| 归档时间: |
|
| 查看次数: |
1008 次 |
| 最近记录: |