HackerURLs

一次又一次被重新发现的经典。

同一个链接,相隔一年以上,一次又一次被人重新发现、再次冲上 Hacker News 首页。能经受住这种时间检验的,大多是值得一读再读的文章。每篇附中文标题,讨论最热的那些再加上中文导读和高赞评论翻译。

从名人堂开始
  • 4,700+篇经过时间检验的经典

Hall of fame

名人堂

在经典库里看全部精选

上首页次数最多、而且有中文导读的 30 篇。时间轴上每个黑点是一次上首页,空心点是一次没冲上去的投稿。

  1. 正在载入经典…

Archive

经典库

按第一次上首页的年份分布,点柱子筛选。

排序

    About

    这些经典是怎么挑出来的

    1. 01

      合并同一个链接

      读取 Hacker News 自 2006 年以来的全部链接投稿,把 http/https、www、跟踪参数等写法不同的同一篇文章合并成一条。

    2. 02

      只留经得起时间的

      同一链接至少两次拿到 50 分以上(约等于上首页),而且两次相隔一年以上;再由 AI 剔除状态页、产品首页和新闻事件。

    3. 03

      写导读、译评论

      上首页次数最多的 2,000 篇配上中文导读、"为什么经久不衰",并精选翻译 HN 高赞评论。导读由 AI 生成,可能有误。

    工具与资源blockloop.io

    精通 Bash 与终端

    Mastering Bash and Terminal

    2次上首页
    4年跨度
    708累计得分
    193条评论

    2017 — 2021,它一次次回到首页

    黑点是上首页(≥ 50 分)的那次投稿,空心点是没冲上去的投稿,点越大分数越高。

    导读

    这是一篇 Bash 与终端使用技巧教程,涵盖快捷键、历史搜索、任务控制、目录切换等日常命令行操作。文章时隔四年再次登上 Hacker News 首页,作者也确认内容依然适用并计划撰写续篇。

    为什么经久不衰:命令行基础技能几十年不变,这篇速查式的技巧合集无论新手还是老手都能随手翻到有用的东西。

    关键词 Bash命令行终端技巧效率

    HN 评论精选

    把全文和讨论区的技巧整理成一份快捷键与命令速查表

    好文好帖,来个速查表:Ctrl-r 搜索历史(再按显示下一个匹配,Tab 显示全部选项);Ctrl-p/Ctrl-n 上一条/下一条命令;在 .bashrc 加 export HISTCONTROL=ignoreboth:erasedups 去重;Ctrl-a/Ctrl-e 跳到行首/行尾;Alt-b/Alt-f 按词移动;Ctrl-k/Ctrl-u 删到行尾/行首;Alt-d/Ctrl-w 删词;cd - 回上个目录;pushd/popd 标记和返回目录;z(rupa/z)和 autojump 模糊 cd;Ctrl-z 挂起、bg 后台继续、fg 调回前台、disown -h 脱离终端、fg %n 调第 n 个任务;less 比 cat 好;find 找文件;ag(the_silver_searcher)更快的 grep;tree 树状显示目录;!! 引用上一条命令如 sudo !!;fish 是默认配置更合理的替代品;更多内容看 man bash。

    greenspot查看英文原文

    Great post & thread, a tl;dr: Ctrl-r search history - then Ctrl-r again to show next match - then Tab to show all options Ctrl-p previous command or arrow up Ctrl-n next command or arrow down export HISTCONTROL=ignoreboth:erasedups Add to .bashrc to avoid duplicate entries Ctrl-a to beginning of line Ctrl-e to end of line Alt-b one word back Alt-f one word forward Ctrl-k delete to end of line Ctrl-u delete to beginning of line Alt-d delete to end of word Ctrl-w delete to beginning of word Alt-Backspc same cd - change to last dir pushd <dir> mark current dir and go to <dir> popd go to marked dir z fuzzy cd, install from https://github.com/rupa/z j fuzzy cd and more, install via autojump Ctrl-z to background & suspend bg recent background app continue running fg bring recent background app to front disown -h remove recent background app from current tty fg %n bring nth app to front, e.g.: fg %2 for second less better than cat, doesn't flood screen, same keys find find files, e.g. find / -name <filename> ag install via the_silver_searcher, faster grep tree shows dir like a GUI app, install !! last command, e.g. sudo !! fish bash alternative with more sensible defaults man bash read more about bash

    在 vim 里用 :! 和 :r! 直接执行命令并把输出读入缓冲区,比挂起更顺手

    与其临时挂起 vim 去用终端,不如用感叹号命令让 vim 自己挂起和恢复,这样不会打乱 vim 会话,还能用 r 前缀把输出读进 vim。例如 :!ls 执行并显示结果;:r!ls 把结果读入;更有用的如 :r!sed -n5,10p that/other/file 读入另一个文件的第 5-10 行。最常用的还是 :!make、:!git status、:!git commit -am "Fixed #23" 这类。

    Normal_gaussian查看英文原文

    Rather than temporarily suspend vim to use the terminal you can get vim to suspend and resume itself with the exclamation mark command. This has the benefit of not wreaking havoc on your vim session and allowing you to read data into vim by prefixing with r. For example :!ls will execute ls and show you the result (press enter to return) :r!ls will read the result of ls in for you More usefully :r!sed -n5,10p that/other/file will read lines 5-10 from that other file. However you will most often want to :!make :!up build :!git status :!git commit -am "Fixed #23"

    作者把 zsh 称为新手是误解,zsh 与 bash 同龄且是超集

    文章不错,但有一点让我不舒服:作者说 zsh 和 fish 是“新潮后起之秀”,可 bash 1989 年发布,zsh 只晚一年,根本不算新;而且 zsh 几乎是 bash 的严格超集,不知道作者觉得缺了什么或“替代得不好”。

    oblio查看英文原文

    The article is nice but a small part of it rubs me the wrong way: > I know there are some cool newcomers out there like zsh and fish, but after trying others out I always found that some of my utilities were missing or ill-replaced. First of all bash was first released in 1989 and zsh arrived just 1 year later so zsh is in no way a newcomer. Secondly zsh is almost strictly a bash superset so I don't know what he was missing (or what he found "ill-replaced").

    macOS 自带的 bash 极旧且不会再更新,文章应提及这一点

    关于 macOS 和 bash,文章没提到 macOS 自带的 bash 版本非常古老,而且 Apple 大概率永远不会更新它(GNU/Linux 系统和 Windows 则继续使用最新版本)。

    teddyh查看英文原文

    Regarding macOS and bash, it is slightly remiss of the article to not at least mention that the version of bash in macOS is 1. Ancient. 2. Will most likely never be updated by Apple (Most GNU- and Linux-based systems, and also Windows, on the other hand, continue to use the latest versions.)

    历次讨论

    同类还值得读

    1. 直接在浏览器中启动 Linux 内核

      Boot a linux kernel right inside your browser.

      Fabrice Bellard 的 JSLinux 页面,用 JavaScript 在浏览器里启动一个 Linux 内核,并提供一个可交互的终端环境。

      工具与资源上首页 5 次 · 2011–2025bellard.org
    2. Hacker News 未公开功能与行为清单(2018)

      A List of Hacker News's Undocumented Features and Behaviors (2018)

      数据科学家 Max Woolf 整理的 Hacker News 未公开功能与行为清单,涵盖投票机制、排名算法、账号惩罚等社区运作细节。

      工具与资源上首页 5 次 · 2019–2025github.com
    3. MapSCII:在终端中用盲文和 ASCII 渲染地图

      MapSCII – Braille and ASCII map renderer for the console

      MapSCII 是一个在命令行终端里渲染地图的开源工具,用盲文字符和 ASCII 字符把地理数据画成可交互浏览的字符地图。

      工具与资源上首页 5 次 · 2017–2025github.com
    4. 顶尖大学的免费在线课程

      Free Online Courses from Top Universities

      Open Culture 整理的一份免费在线课程合集,汇集了全球顶尖大学(如 MIT、斯坦福、耶鲁等)向公众开放的网络课程资源,涵盖音频、视频等多种形式。

      工具与资源上首页 5 次 · 2010–2022openculture.com
    5. 淘气字符串:容易引发用户输入问题的字符串清单

      Naughty Strings: A list of strings likely to cause issues as user-input data

      一个 GitHub 仓库,收录了大量容易让程序出问题的用户输入字符串,如特殊字符、emoji、SQL 注入片段、系统命令等,供开发者用于测试输入处理逻辑。

      工具与资源上首页 4 次 · 2015–2020github.com

    打赏支持

    打赏二维码

    觉得有用,请作者喝杯咖啡。

    WeChat

    关注向阳乔木

    微信公众号「向阳乔木推荐看」

    微信公众号「向阳乔木推荐看」二维码

    微信扫一扫;在微信里打开本页时,长按二维码识别。