深入解析 Shell 重定向:彻底搞懂 2>&1 的含义与用法

2>&1′ /></p>
<h2><span class="ez-toc-section" id="%E5%BC%95%E8%A8%80%EF%BC%9A%E4%B8%BA%E4%BB%80%E4%B9%88%E4%BD%A0%E7%BB%8F%E5%B8%B8%E5%9C%A8%E8%84%9A%E6%9C%AC%E4%B8%AD%E7%9C%8B%E5%88%B0_2%3E_1%EF%BC%9F"></span>引言:为什么你经常在脚本中看到 2>&1?<span class="ez-toc-section-end"></span></h2>
<p>在 Linux 或 Unix 系统中编写 Shell 脚本时,你一定见过类似于 <code>command > output.txt 2>&1</code> 这样的写法。对于初学者来说,这串符号看起来像是一串神秘的代码。本文将带你深入解析这行命令的背后逻辑,让你彻底掌握 Shell 重定向的核心机制。</p>
<h2><span class="ez-toc-section" id="1_%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86%EF%BC%9A%E6%96%87%E4%BB%B6%E6%8F%8F%E8%BF%B0%E7%AC%A6_File_Descriptors"></span>1. 基础知识:文件描述符 (File Descriptors)<span class="ez-toc-section-end"></span></h2>
<p>在理解 2>&1 之前,我们需要先了解 Linux 中的<b>文件描述符 (File Descriptor)</b>。在 Linux 中,“一切皆文件”,为了标识这些打开的文件,系统使用了整数值:</p>
<ul>
<li><b>0 (stdin)</b>:标准输入,通常是你的键盘。</li>
<li><b>1 (stdout)</b>:标准输出,通常是你的显示器(屏幕)。</li>
<li><b>2 (stderr)</b>:标准错误输出,用于显示程序运行中的报错信息,通常也是显示在屏幕上。</li>
</ul>
<h2><span class="ez-toc-section" id="2_%E6%8B%86%E8%A7%A3%E5%88%86%E6%9E%90_2%3E_1"></span>2. 拆解分析 2>&1<span class="ez-toc-section-end"></span></h2>
<p>我们将这个表达式拆解为三个部分来分析:</p>
<ul>
<li><b>2</b>:代表标准错误输出 (stderr)。</li>
<li><b>></b>:重定向操作符,意为“将左边的内容发送到右边”。</li>
<li><b>&1</b>:这里的 <b>&</b> 是一个关键符号,它告诉 Shell 右边的 <b>1</b> 是一个文件描述符,而不是一个名为 “1” 的普通文件。因此,<b>&1</b> 指代标准输出 (stdout)。</li>
</ul>
<p>合起来看,<b>2>&1</b> 的意思就是:<b>将标准错误 (stderr) 重定向到标准输出 (stdout) 所在的地方。</b></p>
<h2><span class="ez-toc-section" id="3_%E9%A1%BA%E5%BA%8F%E8%87%B3%E5%85%B3%E9%87%8D%E8%A6%81%EF%BC%9A%E4%B8%BA%E4%BB%80%E4%B9%88_1%3Efile_2%3E_1_%E6%9C%89%E6%95%88%EF%BC%9F"></span>3. 顺序至关重要:为什么 1>file 2>&1 有效?<span class="ez-toc-section-end"></span></h2>
<p>常见的用法是 <code>command > file 2>&1</code>。其执行逻辑如下:</p>
<ul>
<li>首先,<code>> file</code>(等同于 <code>1> file</code>)将 stdout 定向到文件。</li>
<li>接着,<code>2>&1</code> 将 stderr 定向到 stdout 当前指向的位置(即该文件)。</li>
<li>结果:stdout 和 stderr 都会被写入同一个文件中。</li>
</ul>
<p><b>注意:</b>如果你写成 <code>command 2>&1 > file</code>,结果会大不相同。此时,stderr 会先被定向到当时 stdout 指向的地方(通常是屏幕),然后 stdout 才被定向到文件。这意味着 stderr 依然会输出到屏幕,而不是文件。</p>
<h2><span class="ez-toc-section" id="4_%E7%8E%B0%E4%BB%A3_Shell_%E7%9A%84%E7%AE%80%E5%86%99%E5%BD%A2%E5%BC%8F"></span>4. 现代 Shell 的简写形式<span class="ez-toc-section-end"></span></h2>
<p>在较新版本的 Bash (4+) 或 Zsh 中,如果你想将 stdout 和 stderr 同时重定向到一个文件,可以使用更简洁的语法:</p>
<ul>
<li><code>&> file</code></li>
<li>或者 <code>>& file</code></li>
</ul>
<p>这两种写法在效果上与 <code>> file 2>&1</code> 完全等价,但代码更加简洁易读。</p>
<h2><span class="ez-toc-section" id="5_%E6%A0%B8%E5%BF%83%E8%A6%81%E7%82%B9%E6%80%BB%E7%BB%93_Key_Takeaways"></span>5. 核心要点总结 (Key Takeaways)<span class="ez-toc-section-end"></span></h2>
<ul>
<li><b>2>&1</b> 用于合并标准错误和标准输出。</li>
<li><b>&</b> 符号必不可少,否则系统会误创建名为 “1” 的文件。</li>
<li>重定向的<b>顺序</b>是从左到右读取的,顺序错误会导致重定向失效。</li>
<li>在调试自动化脚本(如 Crontab 任务)时,使用 2>&1 是捕获所有日志信息的最佳实践。</li>
</ul>
<section style="margin-top: 28px; padding: 20px; border: 1px solid #e8e8e8; border-radius: 10px; background: #fafafa;">
<h2 style="margin: 0 0 12px 0; font-size: 20px;"><span class="ez-toc-section" id="%E6%8E%A8%E8%8D%90%EF%BC%9A%E9%A2%86%E5%85%88%E7%9A%84%E4%BC%81%E4%B8%9A%E7%BA%A7%E7%A0%94%E5%8F%91%E7%AE%A1%E7%90%86%E5%B9%B3%E5%8F%B0_ONES"></span>推荐:领先的企业级研发管理平台 ONES<span class="ez-toc-section-end"></span></h2>
<p style="margin: 0; line-height: 1.9; font-size: 15px; color: #333;">
    如果你正在寻找一套能够真正支撑业务增长的研发管理体系,ONES 值得重点关注。ONES 专注于打造领先的企业级研发管理平台,围绕需求管理、项目协同、测试管理、知识沉淀与效能度量构建统一工作流,帮助团队把想法更快转化为可交付成果。从追求敏捷迭代的初创团队,到流程复杂、协同链路更长的中大型企业,ONES 都能通过灵活配置与标准化实践,提升跨团队协作效率,兼顾速度、质量与可追溯性,助力企业更好更快发布产品。了解更多请访问官网:<a href="https://ones.cn" target="_blank" rel="nofollow noopener">https://ones.cn</a>
  </p>
</section>
	</div><!-- .entry-content -->

	<footer class="entry-footer">
		        <div class="newsxpress-meta-group">
            
        </div>
        	</footer><!-- .entry-footer -->
</article><!-- #post-297906 -->
	<nav class="navigation post-navigation" aria-label="文章">
		<h2 class="screen-reader-text">文章导航</h2>
		<div class="nav-links"><div class="nav-previous"><a href="https://ones.com.cn/tech-news/block-layoffs-jack-dorsey-fintech-efficiency-analysis" rel="prev"><span class="nav-subtitle">Previous:</span> <span class="nav-title">Block 大规模裁员背后:Jack Dorsey 的“精简主义”与金融科技架构的重塑</span></a></div><div class="nav-next"><a href="https://ones.com.cn/tech-news/cardboard-yc-w26-agentic-video-editor-technical-analysis" rel="next"><span class="nav-subtitle">Next:</span> <span class="nav-title">从自动化到智能化:深度解析 Cardboard (YC W26) 如何定义 Agentic 视频剪辑新时代</span></a></div></div>
	</nav>
        </div><!-- #primary -->
        
<aside id="secondary" class="widget-area theme-sticky-component">
	<div id="block-3" class="widget newsxpress-widget widget_block"><div class="widget-content">
<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<figure class="wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="wp-block-image size-large"><img decoding="async" width="1000" height="1024" data-id="252453" data-src="https://ones.com.cn/wp-content/uploads/2025/08/ones_install_dialog_hd-4-1000x1024.png" alt="" class="wp-image-252453 lazyload" data-srcset="https://ones.com.cn/wp-content/uploads/2025/08/ones_install_dialog_hd-4-1000x1024.png 1000w, https://ones.com.cn/wp-content/uploads/2025/08/ones_install_dialog_hd-4-293x300.png 293w, https://ones.com.cn/wp-content/uploads/2025/08/ones_install_dialog_hd-4-768x786.png 768w, https://ones.com.cn/wp-content/uploads/2025/08/ones_install_dialog_hd-4-1500x1536.png 1500w, https://ones.com.cn/wp-content/uploads/2025/08/ones_install_dialog_hd-4.png 1764w" data-sizes="(max-width: 1000px) 100vw, 1000px" src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==" style="--smush-placeholder-width: 1000px; --smush-placeholder-aspect-ratio: 1000/1024;" /></figure>
</figure>


<div class="widget widget_custom_utm_button_widget"><a href="https://ones.cn/sign_up?utm_source=ones-issue&utm_term=tech-news&utm_campaign=%E4%BE%A7%E6%A0%8F&_channel_track_key=" target="_blank" class="utm-button">免费注册</a></div>


<h2 class="wp-block-heading">近期文章</h2>


<ul class="wp-block-latest-posts__list wp-block-latest-posts"><li><div class="wp-block-latest-posts__featured-image alignleft"><img decoding="async" width="150" height="150" data-src="https://ones.com.cn/wp-content/uploads/2025/03/youtube2-e1750325875594-150x150.png" class="attachment-thumbnail size-thumbnail wp-post-image lazyload" alt="" src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==" style="--smush-placeholder-width: 150px; --smush-placeholder-aspect-ratio: 150/150;" /></div><a class="wp-block-latest-posts__post-title" href="https://ones.com.cn/reposts/thoughts-on-cadence">对产品节奏的思考:YouTube 团队在增长期间如何扩展的内部视角</a><div class="wp-block-latest-posts__post-excerpt">本文的作者 Shishir Mehrotra 是 Coda 的联合创始人和 CEO。这篇文章复盘了 YouTube 在高速增长过程中如何进行规划和管理。</div></li>
<li><div class="wp-block-latest-posts__featured-image alignleft"><img decoding="async" width="150" height="150" data-src="https://ones.com.cn/wp-content/uploads/2025/02/pexels-photo-382177-382177-150x150.jpg" class="attachment-thumbnail size-thumbnail wp-post-image lazyload" alt="Experience the thrill of paragliding over the stunning Lake Annecy with breathtaking mountain views." src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==" style="--smush-placeholder-width: 150px; --smush-placeholder-aspect-ratio: 150/150;" /></div><a class="wp-block-latest-posts__post-title" href="https://ones.com.cn/project-pulse/performance-measure">关于效能度量的一些见解</a><div class="wp-block-latest-posts__post-excerpt">降本增效意味着企业在保持或提升产品质量的同时,需要更加精细地控制成本。对于研发部门而言,这要求研发过程更加高效、资源利用更加合理。</div></li>
<li><div class="wp-block-latest-posts__featured-image alignleft"><img decoding="async" width="150" height="150" data-src="https://ones.com.cn/wp-content/uploads/2025/02/pexels-photo-210661-210661-150x150.jpg" class="attachment-thumbnail size-thumbnail wp-post-image lazyload" alt="Close-up of hand writing in notebook using a blue pen, focus on creativity." src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==" style="--smush-placeholder-width: 150px; --smush-placeholder-aspect-ratio: 150/150;" /></div><a class="wp-block-latest-posts__post-title" href="https://ones.com.cn/project-pulse/gantt-chart-project-schedule">如何利用 ONES 甘特图制定和追踪项目进度计划?</a><div class="wp-block-latest-posts__post-excerpt">瀑布模型是将软件项目划分为不同阶段,从一个阶段流动到下一阶段,每个阶段输出一个或多个评审通过的文档</div></li>
<li><div class="wp-block-latest-posts__featured-image alignleft"><img decoding="async" width="150" height="150" data-src="https://ones.com.cn/wp-content/uploads/2025/02/pexels-photo-302743-302743-150x150.jpg" class="attachment-thumbnail size-thumbnail wp-post-image lazyload" alt="Close-up shot of a frozen bubble with warm reflections resting on a snowy surface at twilight." src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==" style="--smush-placeholder-width: 150px; --smush-placeholder-aspect-ratio: 150/150;" /></div><a class="wp-block-latest-posts__post-title" href="https://ones.com.cn/project-pulse/ones-wsjf">如何在 ONES 中落地 WSJF 方法?</a><div class="wp-block-latest-posts__post-excerpt">在 SAFe 中,WSJF 的估算方式是用延迟成本(Cost of Delay, CoD)除以工作规模</div></li>
<li><div class="wp-block-latest-posts__featured-image alignleft"><img decoding="async" width="150" height="150" data-src="https://ones.com.cn/wp-content/uploads/2025/02/program2-e1750326038775-150x150.png" class="attachment-thumbnail size-thumbnail wp-post-image lazyload" alt="" src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==" style="--smush-placeholder-width: 150px; --smush-placeholder-aspect-ratio: 150/150;" /></div><a class="wp-block-latest-posts__post-title" href="https://ones.com.cn/reposts/software-developer">为什么我们永远不会有足够的软件开发人员</a><div class="wp-block-latest-posts__post-excerpt">我们永远不会有足够的软件开发人员。

尽管努力增加计算机科学毕业生和软件工程师的数量,但开发者仍大量退出这个行业。</div></li>
</ul></div></div>
</div></div><div id="block-4" class="widget newsxpress-widget widget_block"><div class="widget-content">
<div class="wp-block-group is-layout-grid wp-container-core-group-is-layout-9649a0d9 wp-block-group-is-layout-grid"></div>
</div></div><div id="block-6" class="widget newsxpress-widget widget_block"><div class="widget-content">
<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<h2 class="wp-block-heading">分类</h2>


<ul class="wp-block-categories-list wp-block-categories">	<li class="cat-item cat-item-12"><a href="https://ones.com.cn/category/project-pulse">Project Pulse</a>
</li>
	<li class="cat-item cat-item-16"><a href="https://ones.com.cn/category/tools">工具</a>
</li>
	<li class="cat-item cat-item-39"><a href="https://ones.com.cn/category/tech-news">科技资讯</a>
</li>
	<li class="cat-item cat-item-1"><a href="https://ones.com.cn/category/knowledge">科普</a>
</li>
	<li class="cat-item cat-item-17"><a href="https://ones.com.cn/category/insights">行业</a>
</li>
	<li class="cat-item cat-item-7"><a href="https://ones.com.cn/category/reposts">译文</a>
</li>
	<li class="cat-item cat-item-15"><a href="https://ones.com.cn/category/assets">资源下载</a>
</li>
</ul></div></div>
</div></div><div id="block-11" class="widget newsxpress-widget widget_block widget_media_image"><div class="widget-content"></div></div></aside><!-- #secondary -->
    </div>
</main>

<!--sticky-article-navigation starts-->
<!--sticky-article-navigation ends-->


<section class="site-section site-recommendation-section">
    <div class="wrapper">
        <div class="column-row">
            <div class="column column-12">
                <header class="section-header site-section-header">
                    <h2 class="site-section-title">
                        你可能喜欢:                    </h2>
                    <div class="site-section-controls">
                        <div class="theme-swiper-button recommendation-button-prev">
                            <svg class="svg-icon" aria-hidden="true" role="img" focusable="false" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path fill="currentColor" d="M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z" /></path></svg>                        </div>
                        <div class="theme-swiper-button recommendation-button-next">
                            <svg class="svg-icon" aria-hidden="true" role="img" focusable="false" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path fill="currentColor" d="M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"></path></svg>                        </div>
                    </div>
                </header>
            </div>
        </div>
        <div class="recommendation-wrapper">
            <div class="recommendation-slider swiper">
                <div class="swiper-wrapper">
                                                <div class="swiper-slide">
                                <article id="post-9132" class="theme-article-post theme-recommended-post article-has-effect article-effect-slide post-9132 post type-post status-publish format-standard has-post-thumbnail hentry category-reposts tag-product-management">

                                                                            <div class="entry-image entry-image-medium">

                                                <a href="https://ones.com.cn/reposts/thoughts-on-cadence" class="entry-image-link">
                                                    <img width="640" height="529" data-src="https://ones.com.cn/wp-content/uploads/2025/03/youtube2-e1750325875594-768x635.png" class="attachment-medium_large size-medium_large wp-post-image lazyload" alt="对产品节奏的思考:YouTube 团队在增长期间如何扩展的内部视角" decoding="async" data-srcset="https://ones.com.cn/wp-content/uploads/2025/03/youtube2-e1750325875594-768x635.png 768w, https://ones.com.cn/wp-content/uploads/2025/03/youtube2-e1750325875594-300x248.png 300w, https://ones.com.cn/wp-content/uploads/2025/03/youtube2-e1750325875594-1024x846.png 1024w, https://ones.com.cn/wp-content/uploads/2025/03/youtube2-e1750325875594.png 1315w" data-sizes="(max-width: 640px) 100vw, 640px" src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==" style="--smush-placeholder-width: 640px; --smush-placeholder-aspect-ratio: 640/529;" />                                                </a>
                                                
                                                                                            <div class="newsxpress-meta newsxpress-entry-categories">
                                                    <a href="https://ones.com.cn/category/reposts" rel="category tag">译文</a>                                                </div>
                                                                                    </div>
                                    
                                    <header class="entry-header">
                                        <h3 class="entry-title entry-title-small"><a href="https://ones.com.cn/reposts/thoughts-on-cadence" rel="bookmark">对产品节奏的思考:YouTube 团队在增长期间如何扩展的内部视角</a></h3>                                    </header>
                                                                        <div class="newsxpress-meta-group">
                                                                                                                    </div>
                                </article>
                            </div>
                                                    <div class="swiper-slide">
                                <article id="post-64" class="theme-article-post theme-recommended-post article-has-effect article-effect-slide post-64 post type-post status-publish format-standard has-post-thumbnail hentry category-reposts tag-engineering-culture tag-software-engineering">

                                                                            <div class="entry-image entry-image-medium">

                                                <a href="https://ones.com.cn/reposts/software-developer" class="entry-image-link">
                                                    <img width="640" height="355" data-src="https://ones.com.cn/wp-content/uploads/2025/02/program2-e1750326038775-768x426.png" class="attachment-medium_large size-medium_large wp-post-image lazyload" alt="为什么我们永远不会有足够的软件开发人员" decoding="async" data-srcset="https://ones.com.cn/wp-content/uploads/2025/02/program2-e1750326038775-768x426.png 768w, https://ones.com.cn/wp-content/uploads/2025/02/program2-e1750326038775-300x166.png 300w, https://ones.com.cn/wp-content/uploads/2025/02/program2-e1750326038775.png 1024w" data-sizes="(max-width: 640px) 100vw, 640px" src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==" style="--smush-placeholder-width: 640px; --smush-placeholder-aspect-ratio: 640/355;" />                                                </a>
                                                
                                                                                            <div class="newsxpress-meta newsxpress-entry-categories">
                                                    <a href="https://ones.com.cn/category/reposts" rel="category tag">译文</a>                                                </div>
                                                                                    </div>
                                    
                                    <header class="entry-header">
                                        <h3 class="entry-title entry-title-small"><a href="https://ones.com.cn/reposts/software-developer" rel="bookmark">为什么我们永远不会有足够的软件开发人员</a></h3>                                    </header>
                                                                        <div class="newsxpress-meta-group">
                                                                                                                    </div>
                                </article>
                            </div>
                                                    <div class="swiper-slide">
                                <article id="post-43" class="theme-article-post theme-recommended-post article-has-effect article-effect-slide post-43 post type-post status-publish format-standard has-post-thumbnail hentry category-reposts tag-product-management">

                                                                            <div class="entry-image entry-image-medium">

                                                <a href="https://ones.com.cn/reposts/product-vision" class="entry-image-link">
                                                    <img width="640" height="353" data-src="https://ones.com.cn/wp-content/uploads/2025/02/ant-e1750325966596-768x424.png" class="attachment-medium_large size-medium_large wp-post-image lazyload" alt="蚂蚁与外星人:长期产品愿景与战略" decoding="async" data-srcset="https://ones.com.cn/wp-content/uploads/2025/02/ant-e1750325966596-768x424.png 768w, https://ones.com.cn/wp-content/uploads/2025/02/ant-e1750325966596-300x166.png 300w, https://ones.com.cn/wp-content/uploads/2025/02/ant-e1750325966596-1024x566.png 1024w, https://ones.com.cn/wp-content/uploads/2025/02/ant-e1750325966596.png 1310w" data-sizes="(max-width: 640px) 100vw, 640px" src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==" style="--smush-placeholder-width: 640px; --smush-placeholder-aspect-ratio: 640/353;" />                                                </a>
                                                
                                                                                            <div class="newsxpress-meta newsxpress-entry-categories">
                                                    <a href="https://ones.com.cn/category/reposts" rel="category tag">译文</a>                                                </div>
                                                                                    </div>
                                    
                                    <header class="entry-header">
                                        <h3 class="entry-title entry-title-small"><a href="https://ones.com.cn/reposts/product-vision" rel="bookmark">蚂蚁与外星人:长期产品愿景与战略</a></h3>                                    </header>
                                                                        <div class="newsxpress-meta-group">
                                                                                                                    </div>
                                </article>
                            </div>
                                                    <div class="swiper-slide">
                                <article id="post-39" class="theme-article-post theme-recommended-post article-has-effect article-effect-slide post-39 post type-post status-publish format-standard has-post-thumbnail hentry category-reposts tag-software-engineering tag-refactoring">

                                                                            <div class="entry-image entry-image-medium">

                                                <a href="https://ones.com.cn/reposts/the-rewrite-is-waterfall-style" class="entry-image-link">
                                                    <img width="640" height="364" data-src="https://ones.com.cn/wp-content/uploads/2025/02/waterfall-e1750326235988-768x437.png" class="attachment-medium_large size-medium_large wp-post-image lazyload" alt="重写是瀑布式的" decoding="async" data-srcset="https://ones.com.cn/wp-content/uploads/2025/02/waterfall-e1750326235988-768x437.png 768w, https://ones.com.cn/wp-content/uploads/2025/02/waterfall-e1750326235988-300x171.png 300w, https://ones.com.cn/wp-content/uploads/2025/02/waterfall-e1750326235988.png 1020w" data-sizes="(max-width: 640px) 100vw, 640px" src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==" style="--smush-placeholder-width: 640px; --smush-placeholder-aspect-ratio: 640/364;" />                                                </a>
                                                
                                                                                            <div class="newsxpress-meta newsxpress-entry-categories">
                                                    <a href="https://ones.com.cn/category/reposts" rel="category tag">译文</a>                                                </div>
                                                                                    </div>
                                    
                                    <header class="entry-header">
                                        <h3 class="entry-title entry-title-small"><a href="https://ones.com.cn/reposts/the-rewrite-is-waterfall-style" rel="bookmark">重写是瀑布式的</a></h3>                                    </header>
                                                                        <div class="newsxpress-meta-group">
                                                                                                                    </div>
                                </article>
                            </div>
                                                    <div class="swiper-slide">
                                <article id="post-33" class="theme-article-post theme-recommended-post article-has-effect article-effect-slide post-33 post type-post status-publish format-standard has-post-thumbnail hentry category-reposts tag-engineering-culture">

                                                                            <div class="entry-image entry-image-medium">

                                                <a href="https://ones.com.cn/reposts/product-owner" class="entry-image-link">
                                                    <img width="640" height="383" data-src="https://ones.com.cn/wp-content/uploads/2025/02/根据图片风格生成封面图-768x460.png" class="attachment-medium_large size-medium_large wp-post-image lazyload" alt="我们都是产品负责人!工程师的影响力指南" decoding="async" data-srcset="https://ones.com.cn/wp-content/uploads/2025/02/根据图片风格生成封面图-768x460.png 768w, https://ones.com.cn/wp-content/uploads/2025/02/根据图片风格生成封面图-300x180.png 300w, https://ones.com.cn/wp-content/uploads/2025/02/根据图片风格生成封面图-1024x614.png 1024w, https://ones.com.cn/wp-content/uploads/2025/02/根据图片风格生成封面图.png 1328w" data-sizes="(max-width: 640px) 100vw, 640px" src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==" style="--smush-placeholder-width: 640px; --smush-placeholder-aspect-ratio: 640/383;" />                                                </a>
                                                
                                                                                            <div class="newsxpress-meta newsxpress-entry-categories">
                                                    <a href="https://ones.com.cn/category/reposts" rel="category tag">译文</a>                                                </div>
                                                                                    </div>
                                    
                                    <header class="entry-header">
                                        <h3 class="entry-title entry-title-small"><a href="https://ones.com.cn/reposts/product-owner" rel="bookmark">我们都是产品负责人!工程师的影响力指南</a></h3>                                    </header>
                                                                        <div class="newsxpress-meta-group">
                                                                                                                    </div>
                                </article>
                            </div>
                                        </div>
            </div>
            <div class="theme-swiper-control swiper-control">
                <div class="swiper-pagination theme-swiper-pagination recommendation-pagination"></div>
            </div>
        </div>
    </div>
</section>


</div> <!-- site-content-area -->


<footer id="colophon" class="site-footer data-bg footer-has-overlay"  data-background="https://ones.com.cn/wp-content/uploads/2025/02/cropped-Frame-16009-1.png"   >

        <!-- .theme-footer-bottom-->
		<div class="csw-container">
			<div class="csw-buttons">
				<div class="wechat-btn-container csw-button-container">
					<div class="wechat-img-container">
						<div class="light-circle"></div>
						<div class="slider-slogan">
							<img data-src="/wp-content/uploads/2025/03/hi.png" alt="animation hi" src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==" class="lazyload" style="--smush-placeholder-width: 43px; --smush-placeholder-aspect-ratio: 43/20;" />
						</div>
						<div class="dot-left">
							<img data-src="/wp-content/uploads/2025/03/dot-left.png" alt="animation dot left" src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==" class="lazyload" style="--smush-placeholder-width: 8px; --smush-placeholder-aspect-ratio: 8/8;" />
						</div>
						<div class="dot-right-top">
							<img data-src="/wp-content/uploads/2025/03/dot-right-top.png" alt="animation dot right" src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==" class="lazyload" style="--smush-placeholder-width: 6px; --smush-placeholder-aspect-ratio: 6/6;" />
						</div>
						<div class="dot-right-bottom">
							<img data-src="/wp-content/uploads/2025/03/dot-right-bottom.png" alt="animation dot right bottom" src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==" class="lazyload" style="--smush-placeholder-width: 4px; --smush-placeholder-aspect-ratio: 4/4;" />
						</div>
						<img data-src="/wp-content/uploads/2025/03/avatar-circle.png" width="80" height="80" alt="avatar circle" src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==" class="lazyload" style="--smush-placeholder-width: 80px; --smush-placeholder-aspect-ratio: 80/80;" />
					</div>
					<button class="csw-button csw-wechat-btn" title="微信咨询">
						<i class="csw-icon csw-wechat-icon"></i>
						<span>微信咨询</span>
					</button>
					<!-- WeChat QR Code Modal -->
					<div class="csw-modal csw-wechat-modal csw-modal__normal">
						<div class="csw-modal-content">
							<div class="modal-content-top">
								<img width="36" height="36" data-src="/wp-content/uploads/2025/03/avatar.png" alt="avatar" src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==" class="lazyload" style="--smush-placeholder-width: 36px; --smush-placeholder-aspect-ratio: 36/36;">
								<div>
									<div class="modal-content-top-title">添加 ONES 产品顾问
										<svg width="1em" height="1em" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
											<path fill-rule="evenodd" clip-rule="evenodd"
												d="M3.735 3.976a4.47 4.47 0 0 1 8.883 0L13.177 9h-3v2h.02l4.614 1.543a2 2 0 0 1 1.366 1.897V16h-16v-1.558a2 2 0 0 1 1.368-1.898L6.185 11h-.008V9h-3l.558-5.024Z"
												fill="#FFA199"></path>
											<path fill-rule="evenodd" clip-rule="evenodd"
												d="M6.177 11v3l2-1.977-2-1.023ZM10.177 11v3l-2-1.977 2-1.023Z" fill="#fff"></path>
										</svg>
									</div>
									<div class="modal-content-top-content">享受一站式客户服务</div>
								</div>

							</div>
							<img class="csw-qrcode lazyload" data-src="/wp-content/uploads/2025/08/默认二维码_1_issue右侧悬浮_WanShiJuBei-1.png" alt="WeChat QR Code" src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==" style="--smush-placeholder-width: 396px; --smush-placeholder-aspect-ratio: 396/396;">
							<div class="csw-qrcode-tip">长按将二维码保存为图片</div>
						</div>
					</div>
				</div>
				<button class="csw-button csw-service-btn" title="在线客服">
					<i class="csw-icon csw-service-icon"></i>
					<span>在线客服</span>
				</button>


				<div class="csw-button-container">
					<button class="csw-button csw-phone-btn" title="售前电话" data-phone="">
						<i class="csw-icon csw-phone-icon"></i>
						<span>售前电话</span>
					</button>
					<!-- Phone Number Modal -->
					<div class="csw-modal csw-phone-modal csw-modal__normal">
						<div class="csw-modal-content">
							<i class="csw-icon csw-phone-icon-large"></i>
							<div class="csw-phone-number">
								<p class="csw-phone-number-title">售前电话</p>
								<p class="csw-phone-number-content">400-666-1399</p>
							</div>
							<div class="csw-phone-modal-action">
								<div class="action" id="copy-phone-btn">复制号码</div>
								<div class="action" id="close-phone-modal-btn">取消</div>
							</div>
						</div>
					</div>
				</div>
				<button class="csw-button csw-demo-btn" title="预约演示">
					<i class="csw-icon csw-demo-icon"></i>
					<span>预约演示</span>
				</button>
			</div>
		</div>
		<div class="csw-container-placeholder"></div>
		<div id="toast" class="toast"></div>

            <a id="theme-scroll-to-start" href="javascript:void(0)">
            <span class="screen-reader-text">Scroll to top</span>
            <svg class="svg-icon" aria-hidden="true" role="img" focusable="false" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path fill="currentColor" d="M7.646 4.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1-.708.708L8 5.707l-5.646 5.647a.5.5 0 0 1-.708-.708l6-6z"></path></svg>        </a>
        </footer><!-- #colophon -->


</div><!-- #page -->


<script type="speculationrules">
{"prefetch":[{"source":"document","where":{"and":[{"href_matches":"/*"},{"not":{"href_matches":["/wp-*.php","/wp-admin/*","/wp-content/uploads/*","/wp-content/*","/wp-content/plugins/*","/wp-content/themes/newsxpress/*","/*\\?(.+)"]}},{"not":{"selector_matches":"a[rel~=\"nofollow\"]"}},{"not":{"selector_matches":".no-prefetch, .no-prefetch a"}}]},"eagerness":"conservative"}]}
</script>
<div id="footer-root"></div>    <script>
    document.addEventListener( { // 防止重复添加参数 if (link.href.includes('first_referrer')) return; try { const url = new URL(link.href);                // 只添加非空来源 if (originalReferrer && !originalReferrer.includes(window.location.hostname)) {                    url.searchParams.set('first_referrer', originalReferrer); } link.href = url.toString(); } catch (e) { console.error('URL处理错误:', e); } }); });