<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Productivity | 空垠尘</title><link>/en/tags/productivity/</link><description>Minimalist Static · Boundless Edge</description><generator>Hugo -- gohugo.io</generator><language>en</language><managingEditor>Dukang Xu</managingEditor><webMaster>Dukang Xu</webMaster><copyright>© 2026 空垠尘</copyright><lastBuildDate>Mon, 21 Sep 2026 10:00:00 +0800</lastBuildDate><atom:link href="/en/tags/productivity/index.xml" rel="self" type="application/rss+xml"/><item><title>Take Back Control of Reading: An RSS Guide</title><link>/en/rss-guide/</link><pubDate>Mon, 21 Sep 2026 10:00:00 +0800</pubDate><author>Dukang Xu</author><guid isPermaLink="true">/en/rss-guide/</guid><description>In an era driven by recommendation algorithms and information overload, learn how RSS works, discover top cross-platform readers, and build your own clean, distraction-free reading stream.</description><content:encoded><![CDATA[<h2 id="introduction-why-do-we-feel-exhausted-in-the-information-flood">Introduction: Why Do We Feel Exhausted in the Information Flood?</h2>
<p>Unlock your phone, and most social and news apps greet you with algorithm-driven short videos, clickbait headlines, and endless ads. We seem to consume massive amounts of information, yet after hours of mindless scrolling, we are often left feeling depleted and empty.</p>
<p>Under algorithmic feeds:</p>
<ul>
<li><strong>Algorithms decide what you see</strong>: Platforms prioritize sensationalism and emotional triggers over thoughtful, high-value depth.</li>
<li><strong>Consumption is passive and fragmented</strong>: The creators you genuinely care about get buried deep within bloated timelines, while unsolicited content is repeatedly pushed to your screen.</li>
<li><strong>Walled gardens fragment your attention</strong>: To follow different creators, you are forced to juggle dozens of separate apps and ecosystems.</li>
</ul>
<p>Is there a way to <strong>take back control of our reading</strong>—free from algorithmic manipulation, popup ads, sorted purely chronologically, and limited strictly to what we consciously subscribe to?</p>
<p>The answer lies in an open standard that has stood the test of time: <strong>RSS (Really Simple Syndication)</strong>.</p>
<hr>
<h2 id="1-what-is-rss-a-real-world-analogy">1. What is RSS? A Real-World Analogy</h2>
<p>To understand RSS in the simplest terms:</p>
<blockquote>
<p><strong>Algorithmic Feeds</strong> are like walking through a chaotic street market where hawkers constantly shove flyers into your hands and blare loudspeakers with whatever is &ldquo;trending&rdquo;;<br>
<strong>RSS Subscriptions</strong> are like having a <strong>private mailbox</strong> outside your home. You subscribe only to the few newspapers and journals you trust. Every morning, the mail carrier quietly delivers clean editions, ready for you to read whenever you choose.</p>
</blockquote>
<pre tabindex="0"><code class="language-mermaid" data-lang="mermaid">sequenceDiagram
    autonumber
    participant Author as Content Creator / Blog
    participant Feed as RSS Feed (Data Source)
    participant Reader as RSS Reader (Your Private Mailbox)
    participant User as Reader (You)

    Author-&gt;&gt;Feed: Publishes new article / update
    Feed--&gt;&gt;Reader: Quietly fetches XML data
    Reader-&gt;&gt;User: Renders clean, ad-free typography
</code></pre><h3 id="core-benefits-of-rss">Core Benefits of RSS</h3>
<ol>
<li><strong>100% Clean, Zero Algorithmic Interference</strong>: Updates appear in reverse chronological order with no opaque weighting or &ldquo;recommended for you&rdquo; loops.</li>
<li><strong>Zero Ads or Popups</strong>: Your RSS reader parses the core title, body, code blocks, and images, rendering everything in your preferred fonts and color schemes.</li>
<li><strong>One Hub for Everything</strong>: Aggregate independent tech blogs, GitHub releases, news outlets, and academic journals all inside a single reader.</li>
<li><strong>No Clutter, No FOMO</strong>: You don&rsquo;t need push notifications. Open the reader when you&rsquo;re ready; when you close it, it will never interrupt you.</li>
</ol>
<hr>
<h2 id="2-three-steps-to-get-started-with-rss">2. Three Steps to Get Started with RSS</h2>
<p>Getting started with RSS takes just <strong>3 simple steps</strong>:</p>
<pre tabindex="0"><code class="language-mermaid" data-lang="mermaid">flowchart LR
    Step1[&#34;Step 1&lt;br/&gt;Pick an RSS Reader&#34;] --&gt; Step2[&#34;Step 2&lt;br/&gt;Copy the Site&#39;s RSS Link&#34;]
    Step2 --&gt; Step3[&#34;Step 3&lt;br/&gt;Paste &amp; Enjoy Clean Reading&#34;]
</code></pre><hr>
<h3 id="step-1-choose-an-rss-reader">Step 1: Choose an RSS Reader</h3>
<p>Pick a reader suited to your preferred operating systems and devices:</p>
<table>
	<thead>
			<tr>
					<th style="text-align: left">Platform</th>
					<th style="text-align: left">Recommended App</th>
					<th style="text-align: left">Highlights</th>
					<th style="text-align: left">Best For</th>
					<th style="text-align: left">Pricing</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td style="text-align: left"><strong>macOS / iOS</strong></td>
					<td style="text-align: left"><strong>NetNewsWire</strong></td>
					<td style="text-align: left">Native, ultra-fast, energy-efficient, iCloud sync support</td>
					<td style="text-align: left">Apple ecosystem users</td>
					<td style="text-align: left"><strong>100% Free &amp; Open Source</strong></td>
			</tr>
			<tr>
					<td style="text-align: left"><strong>Cross-Platform (Web/Win/Mac/Mobile)</strong></td>
					<td style="text-align: left"><strong>Follow</strong></td>
					<td style="text-align: left">Next-gen modern UI, AI summaries, social &amp; multimedia views</td>
					<td style="text-align: left">Users looking for modern aesthetics</td>
					<td style="text-align: left"><strong>Free Public Beta</strong></td>
			</tr>
			<tr>
					<td style="text-align: left"><strong>Windows / Mac / Linux</strong></td>
					<td style="text-align: left"><strong>Fluent Reader</strong></td>
					<td style="text-align: left">Modern card/list layout, regex filtering rules, dark mode</td>
					<td style="text-align: left">Desktop power users</td>
					<td style="text-align: left"><strong>100% Free &amp; Open Source</strong></td>
			</tr>
			<tr>
					<td style="text-align: left"><strong>Cloud Services</strong></td>
					<td style="text-align: left"><strong>Inoreader / Feedly</strong></td>
					<td style="text-align: left">Instant web access, seamless multi-device sync, rule filtering</td>
					<td style="text-align: left">Users who prefer cloud-hosted setups</td>
					<td style="text-align: left"><strong>Free tier available</strong></td>
			</tr>
	</tbody>
</table>
<blockquote>
<p>💡 <strong>Quick Recommendation</strong>:</p>
<ul>
<li>If you use a <strong>Mac or iPhone</strong>, download the open-source <strong>NetNewsWire</strong> from the App Store.</li>
<li>If you need <strong>seamless syncing across Windows, Mac, and mobile</strong>, sign up for <strong>Inoreader</strong> or try <strong>Follow</strong>.</li>
</ul>
</blockquote>
<hr>
<h3 id="step-2-find-a-websites-rss-url">Step 2: Find a Website&rsquo;s RSS URL</h3>
<p>On sites supporting RSS, you can locate the subscription URL in several ways:</p>
<ol>
<li><strong>The RSS Icon in the Footer</strong>: Look for the broadcast wave icon $\mathbf{((•))}$ or a direct <code>RSS / Feed</code> link.</li>
<li><strong>Standard URL Patterns</strong>: Most technical blogs and static generators (Hugo, WordPress, Ghost) follow predictable conventions:
<ul>
<li><code>https://example.com/index.xml</code> (Hugo blogs, including this site)</li>
<li><code>https://example.com/feed/</code> or <code>https://example.com/rss.xml</code> (WordPress / generic)</li>
<li><code>https://example.com/atom.xml</code></li>
</ul>
</li>
</ol>
<blockquote>
<p>🚀 <strong>Hands-On: Subscribe to &ldquo;空垠尘&rdquo;</strong></p>
<p>Click the <strong>RSS icon</strong> in our footer, or copy our feed URL directly:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="ln">1</span><span class="cl">https://your-domain.com/index.xml
</span></span></code></pre></div></blockquote>
<hr>
<h3 id="step-3-add-to-your-reader">Step 3: Add to Your Reader</h3>
<ol>
<li>Open your RSS reader and click <strong><code>+</code> (Add Feed)</strong>;</li>
<li>Paste the copied link and confirm;</li>
<li>The reader will automatically detect the site name and fetch recent articles for clean, instantaneous reading!</li>
</ol>
<hr>
<h2 id="3-advanced-tips-cultivating-a-high-quality-information-garden">3. Advanced Tips: Cultivating a High-Quality Information Garden</h2>
<h3 id="1-organize-with-simple-folders">1. Organize with Simple Folders</h3>
<p>Avoid dumping dozens of feeds into a single flat list. Create 3 to 4 intuitive folders based on reading rhythm:</p>
<ul>
<li>📁 <strong>Daily Reads</strong>: A select handful of high-signal creators with consistently exceptional writing.</li>
<li>📁 <strong>Tech &amp; Engineering</strong>: Official framework releases, open-source newsletters, and architecture blogs.</li>
<li>📁 <strong>Design &amp; Inspiration</strong>: Visual inspiration, photography, and product craftsmanship.</li>
<li>📁 <strong>Weekend &amp; Leisure</strong>: Long-form essays, book reviews, and thoughtful musings.</li>
</ul>
<h3 id="2-opml-exportimport-your-data-stays-yours">2. OPML Export/Import: Your Data Stays Yours</h3>
<p>One of RSS&rsquo;s greatest strengths is <strong>zero vendor lock-in</strong>.</p>
<p>Any standard reader allows you to export an <code>.opml</code> file (a standard XML outline of your feed URLs). Whenever you switch devices or migrate to a new reader app, simply import your <code>.opml</code> file, and your entire reading library is instantly restored.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-xml" data-lang="xml"><span class="line"><span class="ln">1</span><span class="cl"><span class="c">&lt;!-- OPML Example: Lightweight &amp; Universal --&gt;</span>
</span></span><span class="line"><span class="ln">2</span><span class="cl"><span class="nt">&lt;opml</span> <span class="na">version=</span><span class="s">&#34;2.0&#34;</span><span class="nt">&gt;</span>
</span></span><span class="line"><span class="ln">3</span><span class="cl">  <span class="nt">&lt;body&gt;</span>
</span></span><span class="line"><span class="ln">4</span><span class="cl">    <span class="nt">&lt;outline</span> <span class="na">text=</span><span class="s">&#34;空垠尘&#34;</span> <span class="na">type=</span><span class="s">&#34;rss&#34;</span> <span class="na">xmlUrl=</span><span class="s">&#34;https://your-domain.com/index.xml&#34;</span><span class="nt">/&gt;</span>
</span></span><span class="line"><span class="ln">5</span><span class="cl">  <span class="nt">&lt;/body&gt;</span>
</span></span><span class="line"><span class="ln">6</span><span class="cl"><span class="nt">&lt;/opml&gt;</span>
</span></span></code></pre></div><h3 id="3-rss-everything-with-rsshub">3. &ldquo;RSS Everything&rdquo; with RSSHub</h3>
<p>If your favorite creators post on platforms without native RSS support (e.g., Bilibili, GitHub Releases, podcasts, or social platforms), you can use the open-source <strong><a href="https://docs.rsshub.app/">RSSHub</a></strong> service to generate standardized RSS feeds for thousands of web platforms.</p>
<hr>
<h2 id="4-mindful-reading-overcoming-unread-badge-anxiety">4. Mindful Reading: Overcoming Unread Badge Anxiety</h2>
<p>Beginners often feel overwhelmed when unread counts reach hundreds of articles. Keep these two golden rules in mind:</p>
<ol>
<li><strong>RSS is a River, Not a Bucket</strong>:
<ul>
<li>You don&rsquo;t have to drink every drop of water that flows past. Dip a cup when you have time; let the rest flow by when you don&rsquo;t.</li>
<li>Use the <strong>&ldquo;Mark All as Read&rdquo;</strong> button liberally to clear badges with zero guilt.</li>
</ul>
</li>
<li><strong>Prune Regularly</strong>:
<ul>
<li>If a feed no longer sparks interest after a few weeks, unsubscribe immediately.</li>
<li>A curated list of 10 remarkable feeds is infinitely more valuable than 100 noisy ones.</li>
</ul>
</li>
</ol>
<hr>
<h2 id="conclusion-a-quiet-space-in-a-noisy-world">Conclusion: A Quiet Space in a Noisy World</h2>
<p>More information is not always better—<strong>the quality of your attention determines the quality of your thoughts</strong>.</p>
<p>Through RSS, we reclaim the power of choosing what we consume from the algorithms. Pick a handful of authors you respect, make a cup of tea, and enjoy reading in a clean, tranquil space.</p>
<p>Feel free to add this blog to your RSS reader, and we look forward to meeting you in future articles.</p>
]]></content:encoded><category>RSS</category><category>Digital Life</category><category>Productivity</category><category>Reading Guide</category><category>Tools</category></item><item><title>Essential Linux &amp; DevOps Commands Handbook</title><link>/en/linux-commands/</link><pubDate>Thu, 17 Sep 2026 10:00:00 +0800</pubDate><author>Dukang Xu</author><guid isPermaLink="true">/en/linux-commands/</guid><description>A battle-tested handbook summarizing high-frequency commands in modern Linux and DevOps operations: covering SSH key matrices, Crontab pitfalls, symlink mechanics, nsenter container debugging, and modern CLI tools.</description><content:encoded><![CDATA[<h2 id="introduction-why-we-need-a-modern-command-handbook">Introduction: Why We Need a Modern Command Handbook</h2>
<p>The Linux command-line landscape is vast. Developers often resort to copying and pasting commands mechanically, only to get stuck when dealing with edge cases such as multi-host jump setups, stripped-down containers lacking debugging shells, or silent cron job failures.</p>
<p>This handbook is organized around <strong>real-world production scenarios</strong>, condensing essential workflows into 5 high-impact modules.</p>
<pre tabindex="0"><code class="language-mermaid" data-lang="mermaid">graph TD
    Root[&#34;Modern DevOps Command System&#34;]
    
    Root --&gt; A[&#34;1. SSH Matrix &amp; Remote Auth&#34;]
    A --&gt; A1[&#34;Ed25519 Modern Robust Keys&#34;]
    A --&gt; A2[&#34;~/.ssh/config Multi-Host &amp; Jump Hosts&#34;]
    A --&gt; A3[&#34;Local &amp; Dynamic Port Forwarding&#34;]
    
    Root --&gt; B[&#34;2. Scheduled Jobs &amp; Daemons&#34;]
    B --&gt; B1[&#34;Crontab Syntax &amp; Environment Traps&#34;]
    B --&gt; B2[&#34;Supervisord Process Auto-Restart&#34;]
    
    Root --&gt; C[&#34;3. File &amp; Time Management&#34;]
    C --&gt; C1[&#34;ln Symlink Practices &amp; Safe Deletion&#34;]
    C --&gt; C2[&#34;date Formatting &amp; Timestamps&#34;]
    C --&gt; C3[&#34;Disk &amp; RAM Diagnostics (df / du / free)&#34;]
    
    Root --&gt; D[&#34;4. Networking &amp; Namespaces&#34;]
    D --&gt; D1[&#34;lsof &amp; ss Port Identification&#34;]
    D --&gt; D2[&#34;nsenter Container Namespace Entry&#34;]
    
    Root --&gt; E[&#34;5. Modern CLI Toolkit&#34;]
    E --&gt; E1[&#34;ripgrep Blazing Text Search&#34;]
    E --&gt; E2[&#34;fzf Interactive Fuzzy Filtering&#34;]
    E --&gt; E3[&#34;jq Structured JSON Slicing&#34;]
</code></pre><hr>
<h2 id="1-ssh-remote-connections--key-matrices">1. SSH Remote Connections &amp; Key Matrices</h2>
<h3 id="1-modern-ssh-key-generation-ed25519-preferred">1. Modern SSH Key Generation (Ed25519 Preferred)</h3>
<p>Replace legacy RSA 2048/4096 keys with modern <strong>Ed25519</strong> elliptic-curve keys:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="ln">1</span><span class="cl"><span class="c1"># Generate ed25519 key pair</span>
</span></span><span class="line"><span class="ln">2</span><span class="cl">ssh-keygen -t ed25519 -C <span class="s2">&#34;your_email@example.com&#34;</span> -f ~/.ssh/id_ed25519
</span></span><span class="line"><span class="ln">3</span><span class="cl">
</span></span><span class="line"><span class="ln">4</span><span class="cl"><span class="c1"># Distribute public key to remote host for passwordless login</span>
</span></span><span class="line"><span class="ln">5</span><span class="cl">ssh-copy-id -i ~/.ssh/id_ed25519.pub user@192.168.1.100
</span></span></code></pre></div><h3 id="2-multi-host-management-with-sshconfig">2. Multi-Host Management with <code>~/.ssh/config</code></h3>
<p>Configure aliases in <code>~/.ssh/config</code> to avoid memorizing raw IPs, ports, and credentials:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="ln"> 1</span><span class="cl"># Cloud Server
</span></span><span class="line"><span class="ln"> 2</span><span class="cl">Host cloud
</span></span><span class="line"><span class="ln"> 3</span><span class="cl">    HostName 1.2.3.4
</span></span><span class="line"><span class="ln"> 4</span><span class="cl">    User root
</span></span><span class="line"><span class="ln"> 5</span><span class="cl">    Port 2222
</span></span><span class="line"><span class="ln"> 6</span><span class="cl">    IdentityFile ~/.ssh/id_ed25519
</span></span><span class="line"><span class="ln"> 7</span><span class="cl">
</span></span><span class="line"><span class="ln"> 8</span><span class="cl"># Local Raspberry Pi
</span></span><span class="line"><span class="ln"> 9</span><span class="cl">Host rpi
</span></span><span class="line"><span class="ln">10</span><span class="cl">    HostName 192.168.1.100
</span></span><span class="line"><span class="ln">11</span><span class="cl">    User pi
</span></span><span class="line"><span class="ln">12</span><span class="cl">    IdentityFile ~/.ssh/id_ed25519
</span></span><span class="line"><span class="ln">13</span><span class="cl">
</span></span><span class="line"><span class="ln">14</span><span class="cl"># Jump Host to Internal Network
</span></span><span class="line"><span class="ln">15</span><span class="cl">Host internal-db
</span></span><span class="line"><span class="ln">16</span><span class="cl">    HostName 10.0.0.5
</span></span><span class="line"><span class="ln">17</span><span class="cl">    User dbadmin
</span></span><span class="line"><span class="ln">18</span><span class="cl">    ProxyJump cloud
</span></span></code></pre></div><p>Connect instantly with <code>ssh cloud</code> or <code>ssh internal-db</code>.</p>
<h3 id="3-ssh-port-forwarding">3. SSH Port Forwarding</h3>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="ln">1</span><span class="cl"><span class="c1"># Local Port Forwarding (-L): Map remote DB (3306) to local 13306</span>
</span></span><span class="line"><span class="ln">2</span><span class="cl">ssh -N -L 13306:127.0.0.1:3306 user@remote-server
</span></span><span class="line"><span class="ln">3</span><span class="cl">
</span></span><span class="line"><span class="ln">4</span><span class="cl"><span class="c1"># Dynamic SOCKS5 Proxy (-D): Turn remote server into a secure proxy tunnel</span>
</span></span><span class="line"><span class="ln">5</span><span class="cl">ssh -N -D <span class="m">10808</span> user@remote-server
</span></span></code></pre></div><hr>
<h2 id="2-cron-jobs--daemon-supervision">2. Cron Jobs &amp; Daemon Supervision</h2>
<h3 id="1-crontab-syntax--critical-pitfalls">1. Crontab Syntax &amp; Critical Pitfalls</h3>
<p>Crontab uses 5 time fields: <code>Minute Hour Day Month Weekday Command</code>.</p>
<blockquote>
<p>⚠️ <strong>Three Major Crontab Pitfalls</strong>:</p>
<ol>
<li><strong>Missing Environment Variables</strong>: Cron runs with a minimal <code>PATH</code>. Always specify <strong>absolute paths</strong> (e.g. <code>/usr/local/bin/python3</code>) or explicitly export <code>PATH</code> in your script.</li>
<li><strong>Working Directory</strong>: Cron executes in the user&rsquo;s home directory by default. Always <code>cd /path/to/workdir</code> inside scripts.</li>
<li><strong>Silent Output Loss</strong>: Always redirect stdout and stderr to a log file:
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="ln">1</span><span class="cl"><span class="m">0</span> <span class="m">3</span> * * * /usr/bin/bash /opt/backup.sh &gt;&gt; /var/log/backup.log 2&gt;<span class="p">&amp;</span><span class="m">1</span>
</span></span></code></pre></div></li>
</ol>
</blockquote>
<h3 id="2-process-supervision-with-supervisord">2. Process Supervision with Supervisord</h3>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-ini" data-lang="ini"><span class="line"><span class="ln">1</span><span class="cl"><span class="c1">; /etc/supervisor/conf.d/my-app.conf</span>
</span></span><span class="line"><span class="ln">2</span><span class="cl"><span class="k">[program:my-app]</span>
</span></span><span class="line"><span class="ln">3</span><span class="cl"><span class="na">directory</span><span class="o">=</span><span class="s">/opt/my-app</span>
</span></span><span class="line"><span class="ln">4</span><span class="cl"><span class="na">command</span><span class="o">=</span><span class="s">/usr/bin/python3 app.py</span>
</span></span><span class="line"><span class="ln">5</span><span class="cl"><span class="na">autostart</span><span class="o">=</span><span class="s">true</span>
</span></span><span class="line"><span class="ln">6</span><span class="cl"><span class="na">autorestart</span><span class="o">=</span><span class="s">true</span>
</span></span><span class="line"><span class="ln">7</span><span class="cl"><span class="na">stderr_logfile</span><span class="o">=</span><span class="s">/var/log/my-app.err.log</span>
</span></span><span class="line"><span class="ln">8</span><span class="cl"><span class="na">stdout_logfile</span><span class="o">=</span><span class="s">/var/log/my-app.out.log</span>
</span></span><span class="line"><span class="ln">9</span><span class="cl"><span class="na">user</span><span class="o">=</span><span class="s">www-data</span>
</span></span></code></pre></div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="ln">1</span><span class="cl">sudo supervisorctl reread
</span></span><span class="line"><span class="ln">2</span><span class="cl">sudo supervisorctl update
</span></span><span class="line"><span class="ln">3</span><span class="cl">sudo supervisorctl status
</span></span></code></pre></div><hr>
<h2 id="3-symlinks--system-timestamps">3. Symlinks &amp; System Timestamps</h2>
<h3 id="1-symbolic-links-ln--s">1. Symbolic Links (<code>ln -s</code>)</h3>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="ln">1</span><span class="cl"><span class="c1"># Create symbolic link: ln -s &lt;target_path&gt; &lt;link_name&gt;</span>
</span></span><span class="line"><span class="ln">2</span><span class="cl">ln -s /mnt/data/music ~/Music
</span></span><span class="line"><span class="ln">3</span><span class="cl">
</span></span><span class="line"><span class="ln">4</span><span class="cl"><span class="c1"># Safe deletion: Never include a trailing slash when removing a symlink!</span>
</span></span><span class="line"><span class="ln">5</span><span class="cl">rm ~/Music      <span class="c1"># Correct: deletes the link</span>
</span></span><span class="line"><span class="ln">6</span><span class="cl">rm -rf ~/Music/ <span class="c1"># Dangerous: might delete real contents in the target directory!</span>
</span></span></code></pre></div><h3 id="2-date-formatting--timestamp-conversion">2. <code>date</code> Formatting &amp; Timestamp Conversion</h3>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="ln">1</span><span class="cl"><span class="c1"># Format current standard time</span>
</span></span><span class="line"><span class="ln">2</span><span class="cl">date +<span class="s2">&#34;%Y-%m-%d %H:%M:%S&#34;</span>
</span></span><span class="line"><span class="ln">3</span><span class="cl">
</span></span><span class="line"><span class="ln">4</span><span class="cl"><span class="c1"># Convert Unix timestamp to human-readable date</span>
</span></span><span class="line"><span class="ln">5</span><span class="cl">date -d @1727258400 +<span class="s2">&#34;%Y-%m-%d %H:%M:%S&#34;</span>  <span class="c1"># (Linux)</span>
</span></span><span class="line"><span class="ln">6</span><span class="cl">date -r <span class="m">1727258400</span> +<span class="s2">&#34;%Y-%m-%d %H:%M:%S&#34;</span>  <span class="c1"># (macOS)</span>
</span></span></code></pre></div><hr>
<h2 id="4-container-namespace-penetration-nsenter">4. Container Namespace Penetration (<code>nsenter</code>)</h2>
<p>Minimal container images (e.g., Distroless, Alpine) often lack <code>bash</code>, <code>curl</code>, or network debugging utilities. Use <strong><code>nsenter</code></strong> to enter the container&rsquo;s namespaces directly from the host:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="ln"> 1</span><span class="cl"><span class="c1"># 1. Get container PID on the host</span>
</span></span><span class="line"><span class="ln"> 2</span><span class="cl"><span class="nv">PID</span><span class="o">=</span><span class="k">$(</span>docker inspect --format <span class="s1">&#39;{{ .State.Pid }}&#39;</span> &lt;container_name_or_id&gt;<span class="k">)</span>
</span></span><span class="line"><span class="ln"> 3</span><span class="cl">
</span></span><span class="line"><span class="ln"> 4</span><span class="cl"><span class="c1"># 2. Enter container network namespace only</span>
</span></span><span class="line"><span class="ln"> 5</span><span class="cl"><span class="c1"># Use host utilities directly inside the container&#39;s network stack!</span>
</span></span><span class="line"><span class="ln"> 6</span><span class="cl">sudo nsenter -t <span class="nv">$PID</span> -n ss -tulnp
</span></span><span class="line"><span class="ln"> 7</span><span class="cl">sudo nsenter -t <span class="nv">$PID</span> -n tcpdump -i eth0 port <span class="m">80</span>
</span></span><span class="line"><span class="ln"> 8</span><span class="cl">
</span></span><span class="line"><span class="ln"> 9</span><span class="cl"><span class="c1"># 3. Enter all container namespaces</span>
</span></span><span class="line"><span class="ln">10</span><span class="cl">sudo nsenter -t <span class="nv">$PID</span> -m -u -i -n -p
</span></span></code></pre></div><hr>
<h2 id="5-modern-cli-toolkit">5. Modern CLI Toolkit</h2>
<table>
	<thead>
			<tr>
					<th style="text-align: left">Task</th>
					<th style="text-align: left">Traditional Tool</th>
					<th style="text-align: left">Modern Alternative</th>
					<th style="text-align: left">Advantage</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td style="text-align: left"><strong>Code / Text Search</strong></td>
					<td style="text-align: left"><code>grep -r</code></td>
					<td style="text-align: left"><strong><code>rg</code> (ripgrep)</strong></td>
					<td style="text-align: left">Rust-based, multithreaded, respects <code>.gitignore</code></td>
			</tr>
			<tr>
					<td style="text-align: left"><strong>Fuzzy Search</strong></td>
					<td style="text-align: left">Paging tools</td>
					<td style="text-align: left"><strong><code>fzf</code></strong></td>
					<td style="text-align: left">Interactive fuzzy matching for files, history, commits</td>
			</tr>
			<tr>
					<td style="text-align: left"><strong>JSON Processing</strong></td>
					<td style="text-align: left">Manual parsing</td>
					<td style="text-align: left"><strong><code>jq</code></strong></td>
					<td style="text-align: left">Structured filtering and slice extraction</td>
			</tr>
			<tr>
					<td style="text-align: left"><strong>Disk Space Analysis</strong></td>
					<td style="text-align: left"><code>du -sh *</code></td>
					<td style="text-align: left"><strong><code>ncdu</code> / <code>dust</code></strong></td>
					<td style="text-align: left">Interactive visual disk usage explorer</td>
			</tr>
			<tr>
					<td style="text-align: left"><strong>System Monitoring</strong></td>
					<td style="text-align: left"><code>top</code></td>
					<td style="text-align: left"><strong><code>btop</code> / <code>htop</code></strong></td>
					<td style="text-align: left">Modern dashboard for CPU, RAM, network, and process tree</td>
			</tr>
	</tbody>
</table>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="ln">1</span><span class="cl"><span class="c1"># Power One-Liners:</span>
</span></span><span class="line"><span class="ln">2</span><span class="cl">rg <span class="s2">&#34;DATABASE_URL&#34;</span> /opt/projects/
</span></span><span class="line"><span class="ln">3</span><span class="cl"><span class="nb">history</span> <span class="p">|</span> fzf
</span></span><span class="line"><span class="ln">4</span><span class="cl">sudo lsof -i :8080
</span></span></code></pre></div>]]></content:encoded><category>Linux</category><category>DevOps</category><category>CLI</category><category>SSH</category><category>Operations</category><category>Productivity</category></item></channel></rss>