Normal view

There are new articles available, click to refresh the page.
Before yesterdayMain stream

夏清侯|张雪峰根本就不应该存在,他的出现本身就是系统故障的症状

30 March 2026 at 19:35

CDT编者按:该文来自知乎网友夏清侯对于知乎提问“张雪峰不幸去世,怎么评价他的一生?”的回复。


CDT 档案卡
标题:张雪峰根本就不应该存在,他的出现本身就是系统故障的症状
作者:夏清侯
发表日期:2026.3.30
来源:知乎
主题归类:张雪峰
CDS收藏:公民馆
版权说明:该作品版权归原作者所有。中国数字时代仅对原作进行存档,以对抗中国的网络审查。详细版权说明

张雪峰根本就不应该存在。

不是说他这个人不该活着。而是说,一个正常运转的教育系统里,压根不该有张雪峰这种角色的生存空间。他的出现本身就是系统故障的症状。

他干的事情其实极其简单——把那些高知家庭餐桌上父母随口就能告诉孩子的常识,卖给了没有这张餐桌的家庭。

哪个专业好就业,哪个行业在衰退,哪些学校的牌子中看不中用。这些信息对于体制内家庭、对于父母本身就是高知的城市中产来说,是空气一样理所当然的东西。

但对于小镇做题家,对于县城里第一代大学生的父母来说,这些信息根本就不存在于他们的认知版图里。

这生意叫信息套利。上游是被系统性遮蔽的高校就业数据、行业薪资结构和专业真实培养质量,下游是几千万焦虑又茫然的家长和考生。

他把上游翻译成下游听得懂的人话——别报新闻、生化环材是天坑、计算机能去就去——然后从这个翻译过程里收钱。

这门生意为什么能做得这么大?

因为信息差足够大。各大院校的招生简章写的是星辰大海,毕业之后等着你的是外卖骑手的头盔。每个专业的真实就业率、薪资中位数、转行比例,在官方口径里长期是一团浆糊。

那些高高在上的知识分子和媒体人恨他。因为他粗暴地扯掉了高等教育那块人文情怀的遮羞布。

那些掌握话语权的人往往大众灌输诸如追逐梦想、全面发展、文科情怀之类的东西,诱导那些根本没有试错资本的普通家庭子弟去用人生购买毫无市场竞争力和实用价值的专业。

然而这套叙事对于有资本托底的精英阶层来说是优雅的自我实现,但对普通人而言,这就是用来抽干他们六个钱包然后将其一脚踢进失业大军的庞氏骗局。

在文科教授们还在大谈特谈诗和远方的时候,张雪峰指着普通家庭孩子的鼻子骂:你家没金币给你爆,你读某些风花雪月的专业就是死路一条。

他把社会阶层固化的残酷现实,把劳动力市场对人的异化,明码标价地摆在台面上。

他告诉那些毫无社会资源的牛马们:你们就是一节电池,别幻想当什么发电机,你们唯一能做的,就是挑一个能让自己卖得贵一点的插座。

在明清两代,这种人叫"场屋明师",专门教穷酸秀才怎么揣摩主考官的癖好,怎么写八股文能拿高分。

他们不讲程朱理学的高深,只讲怎么搞定科举这个变态的系统。

法国社会学家布迪厄提出过"文化资本"的概念,精英阶层的隐性规则和人脉是在餐桌上完成代际传承的,而底层孩子只能死磕教科书。

他为什么不按照他教导别人的那样去追求安稳?

因为当一个人把社会财富分配的底层逻辑看得越透彻,他的阶级焦虑就会越深。

他比任何人都清楚普通人要实现真正的阶级跃迁有多难。安稳只是用来防止平民跌入深渊的降落伞,而他想要坐火箭。

在晚期资本主义的运转逻辑下,哪有什么真正的自由人?

算法和流量是比传统监工更恐怖的皮鞭。

只要你还在这个局里,只要你的公司还要盈利,只要你的信徒还在嗷嗷待哺,你就得不停地播,不停地讲,不停地制造热点。

所以他别无选择。他知道流量的保质期极短,知道政策窗口和网民注意力随时会转移,因此他必须在最短的时间内,将影响力转化为资本。

他指导无数 NPC 去走安全路线,自己却主动选择了一条高杠杆、高收益、极度消耗生命值的地狱难度玩法。

界面文化|维系系统运转的人,往往最没有话语权

12 March 2026 at 17:57
CDT 档案卡
标题:维系系统运转的人,往往最没有话语权 | 专访
作者:界面文化组
发表日期:2026.3.12
来源:微信公众号-界面文化
主题归类:OpenClaw
CDS收藏:公民馆
版权说明:该作品版权归原作者所有。中国数字时代仅对原作进行存档,以对抗中国的网络审查。详细版权说明

file

撰文 | 徐鲁青

编辑 | 李欣媛

OpenClaw热潮下,人们纷纷排队安装龙虾。总有人告诉我们,算法将高速处理信息,把人带进一个更轻松的世界,龙虾热潮点燃的也是这一熟悉的承诺:自动化最终会让我们不用工作。

然而在特雷博尔·朔尔茨看来,自动化从不解放劳动者,正因此,他在《归我们》一书中着重讨论了“所有权”,也是后工作时代急需回答的问题,当 AI 接管越来越多任务,这套系统究竟归谁所有,又由谁来决定它如何运转?

朔尔茨是“平台合作主义”(platform cooperativism)概念最早的提出者之一,他反问:如果政治领域需要民主,为什么工作场域可以例外?在《归我们》一书中,他把目光移向平台的所有权与治理,并写下了过去十多年间已经发生、却很少进入主流叙事的尝试。在一些平台合作社里,有的配送员试着共同拥有配送平台,有的社区自己决定数据如何使用,也有一些照护和出行行业的劳动者,正在摸索更公平的组织方式。

合作社与企业不同的是,后者的所有权和决策权,通常掌握在少数合伙人手中,而合作社强调的是由成员共同拥有,通常实行“一人一票”,并让收益更多回到实际参与劳动的人手中。这种形式并不像想象中那么边缘,根据国际合作社联盟的数据,全球目前有约300万个合作社,覆盖全球约十分之一的就业人口。西班牙的蒙德拉贡合作社就拥有两百多家企业和超过七万名员工,是西班牙第十大企业集团。

朔尔茨试图追问当下被视作理所当然的经济秩序是否真的“别无选择”?在生成式AI迅速扩张,数据权力进一步向少数公司集中的今天,这个问题显得更加迫切了。对此,界面文化与特雷博尔·朔尔茨谈了谈平台合作社的现实实践、AI时代愈发集中的技术权力,以及在平台资本主义之外,人们是否还能重新想象另一种经济方式?

img

01 从“别无选择”到另一种制度想象

界面文化: 为什么会写《归我们!》这本书?

特雷博尔·朔尔茨:这本书并不是从一个抽象理念出发,是来自我长期的实践经验。过去十多年里,我持续参与并推动“平台合作主义”的具体项目,在不同国家与数百个合作组织一起工作,不断经历失败和重新尝试,《归我们!》正是写于这些现实过程之中 。

我与大约一千个合作组织有过直接合作,希望借此重新梳理数字经济中关于所有权、治理与劳动的讨论。更重要的是,我想反对一种被反复灌输的观念,仿佛现有的经济结构是一种“别无选择”。

在很多地方,我看到人们正在极其有限的条件下,努力搭建不同的路径。比如开普敦那些不断重新组织起来的出租车司机,或是墨西哥沿海一些渔业社区,他们在思考,数据究竟能不能真正服务本地家庭,而不是只被外部平台抽走。这样的实践也许并不宏大,却真实存在,而且长期没有被看见。

界面文化: 你提到人们总觉得主流的政治经济想象是“别无选择”,你觉得哪些假设最常被视为理所当然?

特雷博尔·朔尔茨:一个被默认的前提是,好像只要谈到规模,就一定要中心化。似乎大型系统只有依靠自上而下的层级治理,才能高效运转。分布式或联邦式治理,往往还没被认真讨论,就先被视为低效,或者过于理想。我担心正是这种想法,让我们过早放弃了别的可能性,比如合作社式、或者多中心的制度设计,它们未必不能在大规模条件下运转。

第二个常被默认的前提,是创新主要依赖资本配置,尤其是风险投资。久而久之,“获得风投支持的公司”就成了技术发展的标准答案。但我们很少认真去想,互助社、合作社是否也可能带来另一种创新路径,以及另一种分配结果。

还有一个更隐蔽的前提,是主流想象总倾向于把人理解成消费者、雇员或股东,而不是制度的设计者。这种限制是认知性的,当我们对自身能改变什么的想象不断缩小,制度的多样性也会随之萎缩。

img

”[德

界面文化: 大多数读者都不太清楚你说的”平台合作社“是什么,可以解释一下吗?

特雷博尔·朔尔茨:平台合作社也是一种数字平台。表面上看,它和我们熟悉的打车软件、外卖平台没有那么不同,同样有 App、算法和撮合系统。真正不同的地方在于“所有权”,也就是谁拥有它,以及由谁决定它怎么运转。传统平台通常由外部股东控制,平台合作社则更多掌握在真正使用它的人手里,比如劳动者和用户,或者两者共同参与。 

这些年,全球的平台合作社已经覆盖大约120万名劳动者,尤其在清洁、照护和配送这些行业。它不只是一个理想化的想法,在一些案例里,劳动者的收入可以达到主流平台的两倍,还拥有更稳定的排班、以及对平台规则的发言权。劳动者不再只是被管理的人,而是可以直接参与决定平台怎么运行,比如价格、数据,以及未来往哪个方向发展。他们不是只能等待政府来改革平台规则,而是在现实中先把另一种更民主的经济关系实践出来。

举个例子,西班牙格拉纳达的Givit配送合作社(Givit Delivery Cooperative),是一家由工人共同拥有的配送平台,已经可以在较大规模上提供“最后一公里”快递服务。到2025年,它每月配送订单超过20万单,拥有900多名活跃工人社员。和典型的零工劳动不同,这里的工人是雇员身份,有社会保障,收入也更稳定。 

合作社之所以在公共视野里显得“不起眼”,并非因为它们真的无足轻重,是因为它们很少进入商学院、法学院和主流商业叙事,用葛兰西的话说,这是“常识”被塑造的结果:某些经济形式被不断讲述、被视为天然合理,另一些可能性则慢慢退出了人们的想象。 

但不显眼不等于边缘。全球大约有10%的劳动力在合作社中就业,它们也一直在现实中改善着数以百万计人的生活,之所以经常被描述为“缺乏竞争力”,更多说明的是一种主流叙事的成功,而不一定是事实本身。

界面文化: 听起来是很理想的组织方式,但它们在现实中具体是怎么真正实现的?

特雷博尔·朔尔茨:这就涉及一个很关键的问题,平台合作社在法律上并没有一种放之四海而皆准的固定形式。它更像是一组还在不断摸索中的法律和组织实验,会根据所在行业、不同国家或地区的法律环境,以及具体使用的技术而调整。 

在一些地方,它就是比较传统的工人合作社;在另一些地方,它会把合作社所有权和LLC(有限责任公司)这样的公司结构结合起来。还有一些会同时设立非营利机构,引入“托管式所有权”机制、基金会,或者和公共部门合作。也就是说,它并不是只有一种标准答案,是在现实条件中不断寻找可行的组合。 

到了数据和AI治理领域,这种混合形态会更加明显。我们已经看到“数据合作社”开始出现:成员把自己的数据汇集起来,把它当作一种共享资源,集体决定这些数据如何被管理和使用。瑞士的MIDATA就是一个例子。在这个体系里,公民可以在民主监督下,共同决定自己的健康数据如何被用于科研和AI开发。

与此同时,围绕去中心化自治组织(DAO)的实验也在继续。它是一种基于区块链的治理形式。的确,有些 DAO 带有很强的投机色彩,但也有一些在认真探索:能不能把合作社的原则,比如共同治理、成员控制,写进代码之中。

所以今天我们看到的是,各种所有权结构正在相互交织。合作社原本强调的“一人一票”、民主控制、盈余返还成员等原则,正在和新的技术工具结合起来,比如密码学治理、联邦式云基础设施,以及数据托管机制。换句话说,平台合作社并非一张静态蓝图,是仍在展开中的创新现场。

当地时间2026年2月5日,印度新德里,印度内政与合作部长阿米特·沙阿在 Vigyan Bhawan 推出印度首个合作制网约车平台 Bharat Taxi,印度合作国务部长克里尚·帕尔·古尔贾尔、合作与民航国务部长穆尔利达尔·莫霍尔等人出席活动。(图片来源:视觉中国)当地时间2026年2月5日,印度新德里,印度内政与合作部长阿米特·沙阿在 Vigyan Bhawan 推出印度首个合作制网约车平台 Bharat Taxi,印度合作国务部长克里尚·帕尔·古尔贾尔、合作与民航国务部长穆尔利达尔·莫霍尔等人出席活动。(图片来源:视觉中国)

界面文化:你在十多年前就提出“平台合作主义”的概念,今天再提这个概念,你觉得它有了什么变化? 

特雷博尔·朔尔茨:早年很多人相信,合作社平台可以成长为下一个谷歌或苹果,今天看,这样的期待已经不现实了。真正重要的问题不是神话为什么破灭,是神话退场之后,人们在现实里还能做什么。

过去十年,成千上万的组织一直在尝试不同的平台合作模式,其中逐渐沉淀出一些相对稳定的实践。真正可行的路径,往往不是纯粹的理想模型,是各种混合型方案。比如在印度,由合作部推动的Bharat Taxi,依托社区所有的平台技术,已经吸纳了大约十万名司机。类似的尝试,在里约热内卢的市属网约车项目中也能看到,即便有些合作社仍以分包商形式存在,它们依然尽力保留集体所有、民主治理和劳动者保护这些核心原则。 

另一个经常被忽视的问题是,平台合作社不能被孤立来看。它们只有被放进一个更大的支持系统里,才更有可能长期存续。比如共享的数字基础设施、技术支持、制度资源,都会影响它能走多远。这也意味着,合作不能只停留在平台表面,要延伸到它背后的供应链和更广泛的协作网络中。 

02 AI基础设施背后,真正的问题是所有权

界面文化: “所有权”是你在书中反复强调的核心问题。互联网平台往往被看成是中立的平台,为什么它背后的“所有权结构”,长期没有被当作一个核心问题来讨论?

特雷博尔·朔尔茨: 技术从来不是中立的。互联网本身就起源于美国的军事项目,它从一开始就不只是工具,也是一种治理方式。数字系统看上去只是帮助人们行动,但实际上,它们会把一些政治选择写进代码里,进而影响人们如何行动。

朗登·温纳在《技术物具有政治性》中很早就指出了这一点。到了今天,这个判断已经变得更加直观。少数大型科技公司高度集中的权力,正在决定数字世界的规则。比如,一些AI系统会系统性地过滤某些政治议题,这往往是治理逻辑本身的体现。也正因为如此,所有权问题不能再被绕开,因为一个人不可能真正改变一套自己既不拥有、也不控制的系统。 

到了人工智能时代,这种集中趋势只会更明显。今天,全球约三分之二、几乎所有AI系统所依赖的云基础设施,掌握在亚马逊、微软和谷歌三家公司手中。当像英伟达这样的企业开始在全球范围内塑造人们获取算力的方式时,所有权就不再只是一个抽象概念,是基础设施层面的直接权力。

界面文化:说到这一点,你觉得现在的生成式AI会不会改变平台劳动?

特雷博尔·朔尔茨:生成式AI并没有真正改变平台劳动,它只是让这套结构变得更难被看见了。

早期的众包劳动者无论身在何处,时薪通常只有一到两美元。今天这种模式并没有消失,只是更系统地转移到了全球南方——大量数据工人仍以相近的报酬,支撑着今天被称为“人工智能”的系统运转。换句话说,AI经济依旧建立在大规模、低报酬、分散且隐形的劳动之上,只不过外面套上了一层更新、更具未来感的技术叙事。 

界面文化:你觉得未来的AI基础设施,有可能由合作社或公共机构来拥有和治理吗? 

特雷博尔·朔尔茨:这是我现在最关心的问题之一。现在的情况是,技术资源和决定权大多集中在少数大公司手里。从算力、数据到平台系统,真正掌握这些东西的人很少,但成本和风险,却不断被转嫁给下面的人,比如劳动者、数据工人,或者那些依赖平台生活的人。维系整个系统运转的人,往往最没有话语权,也最不容易被看见。

所以我提的“团结堆栈”,并不是某一个具体平台,更像是一种重新组织AI的思路。比如,算力设施可不可以由社区共同拥有?数据可不可以不再被平台单方面提取,是由使用者共同决定怎么管理?AI产业链上的工人,能不能拥有更多权利,甚至拥有一部分所有权?

这里最重要的是不同机构能不能协同起来,形成一种更稳定的合作关系。这些尝试现在还在早期阶段,但已经有一些实践在出现了。它们至少说明,AI并不一定只能按照今天这条路来发展。

比如,瑞士的Apertus很能说明“公共AI基础设施”这条路的可能性。这个模型由苏黎世联邦理工学院、洛桑联邦理工学院和瑞士国家超级计算中心共同开发,它被明确定位为一种面向公共利益的开放模型:模型架构、权重、训练数据和方法都尽可能公开,运行也依托公共研究基础设施,不是完全建立在商业闭源体系之上。还有法国的LESTAC,它代表的是“地方治理型 AI”的方向,并非由全球平台统一提供,而是在城市或地区尺度上,由公共机构和本地伙伴共同试验、共同管理。

这些条件其实并不是完全不存在。真正难的是怎么把它们连起来,变成一个能长期运转的整体。这也是我接下来想继续思考的问题。

界面文化:如果从平台合作主义倡导者的视角出发,反思当今主导性的经济体系,你认为最核心的问题是什么?

特雷博尔·朔尔茨:平台往往在策略上把自己定义为“科技公司”,而非“劳动公司”。它们将自身描绘成中立的技术中介,以此规避劳动法约束,也回避本应承担的社会责任。

与此同时,平台资本主义不断把本应由企业承担的成本向外转嫁。过去十年间,不少与劳动和交通相关的法律都被重写,以适应Uber这类平台公司的扩张。传统工会面对这种由App中介的劳动关系,也很难找到有效的组织杠杆,更难建立起持久的团结。平台劳动的一大特征,就是将劳动者不断个体化、彼此隔离:他们没有共享的工作空间,班次彼此错开,算法管理机制本身也在压制同伴之间的交流。久而久之,孤立会侵蚀信任,集体行动自然也更难持续。

最终带来的,不只是收入不平等,更是能动性的不平等,人们正在失去共同塑造日常技术系统的能力。

本文为独家原创内容,撰文:徐鲁青,编辑:李欣媛,未经授权不得转载。

有淘宝的员工不,咨询下到底怎样才可以关闭淘宝 App 的垃圾通知?

By: v321ex
8 November 2025 at 11:37
v321ex: 如题,V 站应该是有淘宝的程序员或者其他职能员工,真心求问 Android 上到底怎样才可以关闭淘宝 App 的垃圾营销通知,具体的通知见下面的截图:


作为一个不怎么用淘宝的,我想让我的淘宝只收到两类通知:1 )和店铺客服的对话通知 2 )物流通知。

其他什么一分钱抢个东西,抢个红包啥的通知我真的不需要,别在用那么低级诱导性的通知文案天天来用户手机上拉屎了。

设置里的消息通知截图如下:



尝试咨询过客服,只能说从业人员的职业能力真的很参差不齐。
- 有搞不清短信和应用通知的
- 有让我直接关闭通知的
- 有拽上天让我别用淘宝的

我特么的。

连接的方式

By: Steven
30 July 2025 at 19:10

思维是神经细胞的连接产生的;

程序是传感器和硬件连接运行的;

人,是在和其他人连接的过程中诞生的。

构成「系统」的不是原子或者物质,而是原子和物质之间的连接方式,是连接的「方式」决定了涌现出来的东西是什么。

记忆是连接;

业务是连接;

灵魂,也是连接。

病,就是某些连接断了;死,就是所有连接断了;

生,就是新连接产生了;长,就是不断有新连接在产生。

成住坏空,就是「感知—连接—断连—消失」的过程。

因此,无常才是恒常。

自我,也不是什么固定的东西。

Linux Command Line Reference for Common Operations (2)

By: Onlyone
13 December 2011 at 12:54

My previous reference for practical Linux commands was surprisingly popular
with over 3.5 million hits in nearly 5 years. So I've decided to start compiling
another list of somewhat more involved/esoteric commands.
Examples marked with • are valid/safe to paste without modification into a terminal, so
you may want to keep a terminal window open while reading this so you can cut & paste.
CommandDescription
grep . /proc/sys/net/ipv4/*List the contents of flag files
set | grep $USERSearch current environment
tr '\0' '\n' < /proc/$$/environDisplay the startup environment for any process
echo $PATH | tr : '\n'Display the $PATH one per line
kill -0 $$ && echo process exists and can accept signalsCheck for the existence of a process (pid)
find /etc -readable | xargs less -K -p'*ntp' -j $((${LINES:-25}/2))Search paths and data with full context. Use n to iterate
Low impact admin
#apt-get install "package" -o Acquire::http::Dl-Limit=42 \
-o Acquire::Queue-mode=access
Rate limit apt-get to 42KB/s
 echo 'wget url' | at 01:00Download url at 1AM to current dir
#apache2ctl configtest && apache2ctl gracefulRestart apache if config is OK
nice openssl speed sha1Run a low priority command (openssl benchmark)
chrt -i 0 openssl speed sha1Run a low priority command (more effective than nice)
renice 19 -p $$; ionice -c3 -p $$Make shell (script) low priority. Use for non interactive tasks
Interactive monitoring
watch -t -n1 uptimeClock with system load
htop -d 5Better top (scrollable, tree view, lsof/strace integration, ...)
iotopWhat's doing I/O
#watch -d -n30 "nice ps_mem.py | tail -n $((${LINES:-12}-2))"What's using RAM
#iftopWhat's using the network. See also iptraf
#mtr www.pixelbeat.orgping and traceroute combined
Useful utilities
pv < /dev/zero > /dev/nullProgress Viewer for data copying from files and pipes
wkhtml2pdf http://.../linux_commands.html linux_commands.pdfMake a pdf of a web page
timeout 1 sleep 3run a command with bounded time. See also timeout
Networking
python -m SimpleHTTPServerServe current directory tree at http://$HOSTNAME:8000/
openssl s_client -connect www.google.com:443 </dev/null 2>&0 |
openssl x509 -dates -noout
Display the date range for a site's certs
curl -I www.pixelbeat.orgDisplay the server headers for a web site
#lsof -i tcp:80What's using port 80
#httpd -SDisplay a list of apache virtual hosts
vim scp://user@remote//path/to/fileEdit remote file using local vim. Good for high latency links
curl -s http://www.pixelbeat.org/pixelbeat.asc | gpg --importImport a gpg key from the web
tc qdisc add dev lo root handle 1:0 netem delay 20msecAdd 20ms latency to loopback device (for testing)
tc qdisc del dev lo rootRemove latency added above
Notification
echo "DISPLAY=$DISPLAY xmessage cooker" | at "NOW +30min"Popup reminder
notify-send "subject" "message"Display a gnome popup notification
 echo "mail -s 'go home' P@draigBrady.com < /dev/null" | at 17:30Email reminder
 uuencode file name | mail -s subject P@draigBrady.comSend a file via email
 ansi2html.sh | mail -a "Content-Type: text/html" P@draigBrady.comSend/Generate HTML email
Better default settings (useful in your .bashrc)
#tail -s.1 -f /var/log/messagesDisplay file additions more responsively
seq 100 | tail -n $((${LINES:-12}-2))Display as many lines as possible without scrolling
#tcpdump -s0Capture full network packets
Useful functions/aliases (useful in your .bashrc)
md () { mkdir -p "$1" && cd "$1"; }Change to a new directory
strerror() { python -c "import os; print os.strerror($1)"; }Display the meaning of an errno
plot() { { echo 'plot "-"' "$@"; cat; } | gnuplot -persist; }Plot stdin. (e.g: • seq 1000 | sed 's/.*/s(&)/' | bc -l | plot)
hili() { e="$1"; shift; grep --col=always -Eih "$e|$" "$@"; }highlight occurences of expr. (e.g: • env | hili $USER)
alias hd='od -Ax -tx1z -v'Hexdump. (usage e.g.: • hd /proc/self/cmdline | less)
alias realpath='readlink -f'Canonicalize path. (usage e.g.: • realpath ~/../$USER)
ord() { printf "0x%x\n" "'$1"; }shell version of the ord() function
chr() { printf $(printf '\\%03o\\n' "$1"); }shell version of the chr() function
Multimedia
DISPLAY=:0.0 import -window root orig.pngTake a (remote) screenshot
convert -filter catrom -resize '600x>' orig.png 600px_wide.pngShrink to width, computer gen images or screenshots
 mplayer -ao pcm -vo null -vc dummy /tmp/Flash*Extract audio from flash video to audiodump.wav
 ffmpeg -i filename.aviDisplay info about multimedia file
ffmpeg -f x11grab -s xga -r 25 -i :0 -sameq demo.mpgCapture video of an X display
DVD
 for i in $(seq 9); do ffmpeg -i $i.avi -target pal-dvd $i.mpg; doneConvert video to the correct encoding and aspect for DVD
 dvdauthor -odvd -t -v "pal,4:3,720xfull" *.mpg;dvdauthor -odvd -TBuild DVD file system. Use 16:9 for widescreen input
 growisofs -dvd-compat -Z /dev/dvd -dvd-video dvdBurn DVD file system to disc
Unicode
python -c "import unicodedata as u; print u.name(unichr(0x2028))"Lookup a unicode character
uconv -f utf8 -t utf8 -x nfcNormalize combining characters
printf '\300\200' | iconv -futf8 -tutf8 >/dev/nullValidate UTF-8
printf 'ŨTF8\n' | LANG=C grep --color=always '[^ -~]\+'Highlight non printable ASCII chars in UTF-8
fc-match -s "sans:lang=zh"List font match order for language and style
Development
gcc -march=native -E -v -</dev/null 2>&1|sed -n 's/.*-mar/-mar/p'Show autodetected gcc tuning params. See also gcccpuopt
for i in $(seq 4); do { [ $i = 1 ] && wget http://url.ie/6lko -qO-||
./a.out; } | tee /dev/tty | gcc -xc - 2>/dev/null; done
Compile and execute C code from stdin
cpp -dM /dev/nullShow all predefined macros
echo "#include <features.h>" | cpp -dN | grep "#define __USE_"Show all glibc feature macros
 gdb -tuiDebug showing source code context in separate windows
udev
udevadm info -a -p $(udevadm info -q path -n /dev/input/mouse0)List udev attributes of a device, for matching rules etc.
udevadm test /sys/class/input/mouse0See how udev rules are applied for a device
#udevadm control --reload-rulesReload udev rules after modification
Extended Attributes (Note you may need to (re)mount with "acl" or "user_xattr" options)
getfacl .Show ACLs for file
setfacl -m u:nobody:r .Allow a specific user to read file
setfacl -x u:nobody .Delete a specific user's rights to file
 setfacl --default -m group:users:rw- dir/Set umask for a for a specific dir
 getcap fileShow capabilities for a program
 setcap cap_net_raw+ep your_gtk_progAllow gtk program raw access to network
stat -c%C .Show SELinux context for file
 chcon ... fileSet SELinux context for file (see also restorecon)
getfattr -m- -d .Show all extended attributes (includes selinux,acls,...)
setfattr -n "user.foo" -v "bar" .Set arbitrary user attributes
BASH specific
echo 123 | tee >(tr 1 a) | tr 1 bSplit data to 2 commands (using process substitution)
 meld local_file <(ssh host cat remote_file)Compare a local and remote file (using process substitution)
Multicore
taskset -c 0 nprocRestrict a command to certain processors
find -type f -print0 | xargs -r0 -P$(nproc) -n10 md5sumProcess files in parallel over available processors
 sort -m <(sort data1) <(sort data2) >data.sortedSort separate data files over 2 processors

Linux Command Line Reference for Common Operations

By: Onlyone
13 December 2011 at 11:45

This is a linux command line reference for common operations.
Examples marked with • are valid/safe to paste without modification into a terminal, so
you may want to keep a terminal window open while reading this so you can cut & paste.
All these commands have been tested both on Fedora and Ubuntu.
See also more linux commands.
CommandDescription
apropos whatisShow commands pertinent to string. See also threadsafe
man -t ascii | ps2pdf - > ascii.pdfmake a pdf of a manual page
which commandShow full path name of command
time commandSee how long a command takes
time catStart stopwatch. Ctrl-d to stop. See also sw
dir navigation
cd -Go to previous directory
cdGo to $HOME directory
(cd dir && command)Go to dir, execute command and return to current dir
pushd .Put current dir on stack so you can popd back to it
file searching
alias l='ls -l --color=auto'quick dir listing
ls -lrtList files by date. See also newest and find_mm_yyyy
ls /usr/bin | pr -T9 -W$COLUMNSPrint in 9 columns to width of terminal
find -name '*.[ch]' | xargs grep -E 'expr'Search 'expr' in this dir and below. See also findrepo
find -type f -print0 | xargs -r0 grep -F 'example'Search all regular files for 'example' in this dir and below
find -maxdepth 1 -type f | xargs grep -F 'example'Search all regular files for 'example' in this dir
find -maxdepth 1 -type d | while read dir; do echo $dir; echo cmd2; doneProcess each item with multiple commands (in while loop)
find -type f ! -perm -444Find files not readable by all (useful for web site)
find -type d ! -perm -111Find dirs not accessible by all (useful for web site)
locate -r 'file[^/]*\.txt'Search cached index for names. This re is like glob *file*.txt
look referenceQuickly search (sorted) dictionary for prefix
grep --color reference /usr/share/dict/wordsHighlight occurances of regular expression in dictionary
archives and compression
gpg -c fileEncrypt file
gpg file.gpgDecrypt file
tar -c dir/ | bzip2 > dir.tar.bz2Make compressed archive of dir/
bzip2 -dc dir.tar.bz2 | tar -xExtract archive (use gzip instead of bzip2 for tar.gz files)
tar -c dir/ | gzip | gpg -c | ssh user@remote 'dd of=dir.tar.gz.gpg'Make encrypted archive of dir/ on remote machine
find dir/ -name '*.txt' | tar -c --files-from=- | bzip2 > dir_txt.tar.bz2Make archive of subset of dir/ and below
find dir/ -name '*.txt' | xargs cp -a --target-directory=dir_txt/ --parentsMake copy of subset of dir/ and below
(tar -c /dir/to/copy) | ( cd /where/to/ && tar -x -p )Copy (with permissions) copy/ dir to /where/to/ dir
(cd /dir/to/copy && tar -c .) | ( cd /where/to/ && tar -x -p )Copy (with permissions) contents of copy/ dir to /where/to/
(tar -c /dir/to/copy ) | ssh -C user@remote 'cd /where/to/ && tar -x -p'Copy (with permissions) copy/ dir to remote:/where/to/ dir
dd bs=1M if=/dev/sda | gzip | ssh user@remote 'dd of=sda.gz'Backup harddisk to remote machine
rsync (Network efficient file copier: Use the --dry-run option for testing)
rsync -P rsync://rsync.server.com/path/to/file fileOnly get diffs. Do multiple times for troublesome downloads
rsync --bwlimit=1000 fromfile tofileLocally copy with rate limit. It's like nice for I/O
rsync -az -e ssh --delete ~/public_html/ remote.com:'~/public_html'Mirror web site (using compression and encryption)
rsync -auz -e ssh remote:/dir/ . && rsync -auz -e ssh . remote:/dir/Synchronize current directory with remote one
ssh (Secure SHell)
ssh $USER@$HOST commandRun command on $HOST as $USER (default command=shell)
ssh -f -Y $USER@$HOSTNAME xeyesRun GUI command on $HOSTNAME as $USER
scp -p -r $USER@$HOST: file dir/Copy with permissions to $USER's home directory on $HOST
scp -c arcfour $USER@$LANHOST: bigfileUse faster crypto for local LAN. This might saturate GigE
ssh -g -L 8080:localhost:80 root@$HOSTForward connections to $HOSTNAME:8080 out to $HOST:80
ssh -R 1434:imap:143 root@$HOSTForward connections from $HOST:1434 in to imap:143
ssh-copy-id $USER@$HOSTInstall public key for $USER@$HOST for password-less log in
wget (multi purpose download tool)
(cd dir/ && wget -nd -pHEKk http://www.pixelbeat.org/cmdline.html)Store local browsable version of a page to the current dir
wget -c http://www.example.com/large.fileContinue downloading a partially downloaded file
wget -r -nd -np -l1 -A '*.jpg' http://www.example.com/dir/Download a set of files to the current directory
wget ftp://remote/file[1-9].iso/FTP supports globbing directly
wget -q -O- http://www.pixelbeat.org/timeline.html | grep 'a href' | headProcess output directly
echo 'wget url' | at 01:00Download url at 1AM to current dir
wget --limit-rate=20k urlDo a low priority download (limit to 20KB/s in this case)
wget -nv --spider --force-html -i bookmarks.htmlCheck links in a file
wget --mirror http://www.example.com/Efficiently update a local copy of a site (handy from cron)
networking (Note ifconfig, route, mii-tool, nslookup commands are obsolete)
ethtool eth0Show status of ethernet interface eth0
ethtool --change eth0 autoneg off speed 100 duplex fullManually set ethernet interface speed
iwconfig eth1Show status of wireless interface eth1
iwconfig eth1 rate 1Mb/s fixedManually set wireless interface speed
iwlist scanList wireless networks in range
ip link showList network interfaces
ip link set dev eth0 name wanRename interface eth0 to wan
ip link set dev eth0 upBring interface eth0 up (or down)
ip addr showList addresses for interfaces
ip addr add 1.2.3.4/24 brd + dev eth0Add (or del) ip and mask (255.255.255.0)
ip route showList routing table
ip route add default via 1.2.3.254Set default gateway to 1.2.3.254
host pixelbeat.orgookup DNS ip address for name or vice versaL
hostname -iLookup local ip address (equivalent to host `hostname`)
whois pixelbeat.orgLookup whois info for hostname or ip address
netstat -tuplList internet services on a system
netstat -tupList active connections to/from system
windows networking (Note samba is the package that provides all this windows specific networking support)
smbtreeFind windows machines. See also findsmb
nmblookup -A 1.2.3.4Find the windows (netbios) name associated with ip address
smbclient -L windows_boxList shares on windows machine or samba server
mount -t smbfs -o fmask=666,guest //windows_box/share /mnt/shareMount a windows share
echo 'message' | smbclient -M windows_boxSend popup to windows machine (off by default in XP sp2)
text manipulation (Note sed uses stdin and stdout. Newer versions support inplace editing with the -i option)
sed 's/string1/string2/g'Replace string1 with string2
sed 's/\(.*\)1/\12/g'Modify anystring1 to anystring2
sed '/ *#/d; /^ *$/d'Remove comments and blank lines
sed ':a; /\\$/N; s/\\\n//; ta'Concatenate lines with trailing \
sed 's/[ \t]*$//'Remove trailing spaces from lines
sed 's/\([`"$\]\)/\\\1/g'Escape shell metacharacters active within double quotes
seq 10 | sed "s/^/      /; s/ *\(.\{7,\}\)/\1/"Right align numbers
sed -n '1000{p;q}'Print 1000th line
sed -n '10,20p;20q'Print lines 10 to 20
sed -n 's/.*<title>\(.*\)<\/title>.*/\1/ip;T;q'Extract title from HTML web page
sed -i 42d ~/.ssh/known_hostsDelete a particular line
sort -t. -k1,1n -k2,2n -k3,3n -k4,4nSort IPV4 ip addresses
echo 'Test' | tr '[:lower:]' '[:upper:]'Case conversion
tr -dc '[:print:]' < /dev/urandomFilter non printable characters
tr -s '[:blank:]' '\t' </proc/diskstats | cut -f4cut fields separated by blanks
history | wc -lCount lines
set operations (Note you can export LANG=C for speed. Also these assume no duplicate lines within a file)
sort file1 file2 | uniqUnion of unsorted files
sort file1 file2 | uniq -dIntersection of unsorted files
sort file1 file1 file2 | uniq -uDifference of unsorted files
sort file1 file2 | uniq -uSymmetric Difference of unsorted files
join -t'\0' -a1 -a2 file1 file2Union of sorted files
join -t'\0' file1 file2Intersection of sorted files
join -t'\0' -v2 file1 file2Difference of sorted files
join -t'\0' -v1 -v2 file1 file2Symmetric Difference of sorted files
math
echo '(1 + sqrt(5))/2' | bc -lQuick math (Calculate φ). See also bc
seq -f '4/%g' 1 2 99999 | paste -sd-+ | bc -lCalculate π the unix way
echo 'pad=20; min=64; (100*10^6)/((pad+min)*8)' | bcMore complex (int) e.g. This shows max FastE packet rate
echo 'pad=20; min=64; print (100E6)/((pad+min)*8)' | pythonPython handles scientific notation
echo 'pad=20; plot [64:1518] (100*10**6)/((pad+x)*8)' | gnuplot -persistPlot FastE packet rate vs packet size
echo 'obase=16; ibase=10; 64206' | bcBase conversion (decimal to hexadecimal)
echo $((0x2dec))Base conversion (hex to dec) ((shell arithmetic expansion))
units -t '100m/9.58s' 'miles/hour'Unit conversion (metric to imperial)
units -t '500GB' 'GiB'Unit conversion (SI to IEC prefixes)
units -t '1 googol'Definition lookup
seq 100 | (tr '\n' +; echo 0) | bcAdd a column of numbers. See also add and funcpy
calendar
cal -3Display a calendar
cal 9 1752Display a calendar for a particular month year
date -d friWhat date is it this friday. See also day
[ $(date -d '12:00 +1 day' +%d) = '01' ] || exitexit a script unless it's the last day of the month
date --date='25 Dec' +%AWhat day does xmas fall on, this year
date --date='@2147483647'Convert seconds since the epoch (1970-01-01 UTC) to date
TZ='America/Los_Angeles' dateWhat time is it on west coast of US (use tzselect to find TZ)
date --date='TZ="America/Los_Angeles" 09:00 next Fri'What's the local time for 9AM next Friday on west coast US
locales
printf "%'d\n" 1234Print number with thousands grouping appropriate to locale
BLOCK_SIZE=\'1 ls -lUse locale thousands grouping in ls. See also l
echo "I live in `locale territory`"Extract info from locale database
LANG=en_IE.utf8 locale int_prefixLookup locale info for specific country. See also ccodes
locale -kc $(locale | sed -n 's/\(LC_.\{4,\}\)=.*/\1/p') | lessList fields available in locale database
recode (Obsoletes iconv, dos2unix, unix2dos)
recode -l | lessShow available conversions (aliases on each line)
recode windows-1252.. file_to_change.txtWindows "ansi" to local charset (auto does CRLF conversion)
recode utf-8/CRLF.. file_to_change.txtWindows utf8 to local charset
recode iso-8859-15..utf8 file_to_change.txtLatin9 (western europe) to utf8
recode ../b64 < file.txt > file.b64Base64 encode
recode /qp.. < file.qp > file.txtQuoted printable decode
recode ..HTML < file.txt > file.htmlText to HTML
recode -lf windows-1252 | grep euroLookup table of characters
echo -n 0x80 | recode latin-9/x1..dumpShow what a code represents in latin-9 charmap
echo -n 0x20AC | recode ucs-2/x2..latin-9/xShow latin-9 encoding
echo -n 0x20AC | recode ucs-2/x2..utf-8/xShow utf-8 encoding
CDs
gzip < /dev/cdrom > cdrom.iso.gzSave copy of data cdrom
mkisofs -V LABEL -r dir | gzip > cdrom.iso.gzCreate cdrom image from contents of dir
mount -o loop cdrom.iso /mnt/dirMount the cdrom image at /mnt/dir (read only)
cdrecord -v dev=/dev/cdrom blank=fastClear a CDRW
gzip -dc cdrom.iso.gz | cdrecord -v dev=/dev/cdrom -Burn cdrom image (use dev=ATAPI -scanbus to confirm dev)
cdparanoia -BRip audio tracks from CD to wav files in current dir
cdrecord -v dev=/dev/cdrom -audio -pad *.wavMake audio CD from all wavs in current dir (see also cdrdao)
oggenc --tracknum='track' track.cdda.wav -o 'track.ogg'Make ogg file from wav file
disk space (See also FSlint)
ls -lSrShow files by size, biggest last
du -s * | sort -k1,1rn | headShow top disk users in current dir. See also dutop
du -hs /home/* | sort -k1,1hSort paths by easy to interpret disk usage
df -hShow free space on mounted filesystems
df -iShow free inodes on mounted filesystems
fdisk -lShow disks partitions sizes and types (run as root)
rpm -q -a --qf '%10{SIZE}\t%{NAME}\n' | sort -k1,1nList all packages by installed size (Bytes) on rpm distros
dpkg-query -W -f='${Installed-Size;10}\t${Package}\n' | sort -k1,1nList all packages by installed size (KBytes) on deb distros
dd bs=1 seek=2TB if=/dev/null of=ext3.testCreate a large test file (taking no space). See also truncate
> filetruncate data of file or create an empty file
monitoring/debugging
tail -f /var/log/messagesMonitor messages in a log file
strace -c ls >/dev/nullSummarise/profile system calls made by command
strace -f -e open ls >/dev/nullList system calls made by command
strace -f -e trace=write -e write=1,2 ls >/dev/nullMonitor what's written to stdout and stderr
ltrace -f -e getenv ls >/dev/nullList library calls made by command
lsof -p $$List paths that process id has open
lsof ~List processes that have specified path open
tcpdump not port 22Show network traffic except ssh. See also tcpdump_not_me
ps -e -o pid,args --forestList processes in a hierarchy
ps -e -o pcpu,cpu,nice,state,cputime,args --sort pcpu | sed '/^ 0.0 /d'List processes by % cpu usage
ps -e -orss=,args= | sort -b -k1,1n | pr -TW$COLUMNSList processes by mem (KB) usage. See also ps_mem.py
ps -C firefox-bin -L -o pid,tid,pcpu,stateList all threads for a particular process
ps -p 1,$$ -o etime=List elapsed wall time for particular process IDs
last rebootShow system reboot history
free -mShow amount of (remaining) RAM (-m displays in MB)
watch -n.1 'cat /proc/interrupts'Watch changeable data continuously
udevadm monitorMonitor udev events to help configure rules
system information (see also sysinfo) ('#' means root access is required)
uname -aShow kernel version and system architecture
head -n1 /etc/issueShow name and version of distribution
cat /proc/partitionsShow all partitions registered on the system
grep MemTotal /proc/meminfoShow RAM total seen by the system
grep "model name" /proc/cpuinfoShow CPU(s) info
lspci -tvShow PCI info
lsusb -tvShow USB info
mount | column -tList mounted filesystems on the system (and align output)
grep -F capacity: /proc/acpi/battery/BAT0/infoShow state of cells in laptop battery
#dmidecode -q | lessDisplay SMBIOS/DMI information
#smartctl -A /dev/sda | grep Power_On_HoursHow long has this disk (system) been powered on in total
#hdparm -i /dev/sdaShow info about disk sda
#hdparm -tT /dev/sdaDo a read speed test on disk sda
#badblocks -s /dev/sdaTest for unreadable blocks on disk sda
interactive (see also linux keyboard shortcuts)
readlineLine editor used by bash, python, bc, gnuplot, ...
screenVirtual terminals with detach capability, ...
mcPowerful file manager that can browse rpm, tar, ftp, ssh, ...
gnuplotInteractive/scriptable graphing
linksWeb browser
xdg-open .open a file or url with the registered desktop application
© Jan 7 2008   [Comments] | [Add link to ...] |

Linux系统信息查看命令大全

By: Onlyone
13 December 2011 at 11:41

最近看了一些Linux命令行的文章,在系统信息查看方面学到不少命令。发现这些系统信息查看命令也可以总结出一篇小小的东西来了。

另外这里还有非常多的命令, 可以作为参考。


系统
# uname -a               # 查看内核/操作系统/CPU信息
# head -n 1 /etc/issue   # 查看操作系统版本
# cat /proc/cpuinfo      # 查看CPU信息
# hostname               # 查看计算机名
# lspci -tv              # 列出所有PCI设备
# lsusb -tv              # 列出所有USB设备
# lsmod                  # 列出加载的内核模块
# env                    # 查看环境变量
资源
# free -m                # 查看内存使用量和交换区使用量
# df -h                  # 查看各分区使用情况
# du -sh <目录名>        # 查看指定目录的大小
# grep MemTotal /proc/meminfo   # 查看内存总量
# grep MemFree /proc/meminfo    # 查看空闲内存量
# uptime                 # 查看系统运行时间、用户数、负载
# cat /proc/loadavg      # 查看系统负载
磁盘和分区
# mount | column -t      # 查看挂接的分区状态
# fdisk -l               # 查看所有分区
# swapon -s              # 查看所有交换分区
# hdparm -i /dev/hda     # 查看磁盘参数(仅适用于IDE设备)
# dmesg | grep IDE       # 查看启动时IDE设备检测状况
网络
# ifconfig               # 查看所有网络接口的属性
# iptables -L            # 查看防火墙设置
# route -n               # 查看路由表
# netstat -lntp          # 查看所有监听端口
# netstat -antp          # 查看所有已经建立的连接
# netstat -s             # 查看网络统计信息
进程
# ps -ef                 # 查看所有进程
# top                    # 实时显示进程状态
用户
# w                      # 查看活动用户
# id <用户名>            # 查看指定用户信息
# last                   # 查看用户登录日志
# cut -d: -f1 /etc/passwd   # 查看系统所有用户
# cut -d: -f1 /etc/group    # 查看系统所有组
# crontab -l             # 查看当前用户的计划任务
服务
# chkconfig --list       # 列出所有系统服务
# chkconfig --list | grep on    # 列出所有启动的系统服务
程序
# rpm -qa                # 查看所有安装的软件包

附加一张总结的很好Linux常用命定的图片:
Linux 文件结构大全

❌
❌