TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Share your best terminal tricks

2 pointsby zabanaalmost 8 years ago

3 comments

PeterHKalmost 8 years ago
Stuck in a broken remote session?<p><pre><code> &lt;enter&gt; ~.&lt;enter&gt; </code></pre> want to use different command on last argument?<p><pre><code> less &#x2F;path&#x2F;to&#x2F;some.file vim !$ </code></pre> piping and sudo<p><pre><code> sudo sh -c &quot;my command | jq &gt; meh.txt&quot;</code></pre>
KishanBalmost 8 years ago
To clear only the contents of a file (my most used and most favourite one esp with application logs)<p>cat &#x2F;dev&#x2F;null &gt; any_file.txt
Eccoalmost 8 years ago
Ctrl-D = EoF = Closes the term &#x2F; tmux