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.

If you less this txt file, your terminal plays a sound

8 pointsby phoenixreaderabout 2 years ago

10 comments

XMPPwockyabout 2 years ago
That&#x27;s nothing- run `curl <a href="https:&#x2F;&#x2F;xmppwocky.net&#x2F;curlme.txt" rel="nofollow">https:&#x2F;&#x2F;xmppwocky.net&#x2F;curlme.txt</a>` on, say, OS X Terminal.app (and a lot of Linux terminal emulators, too) and your terminal window will do things like steal focus, maximize and minimize repeatedly, move around the screen...<p>(don&#x27;t do this on a terminal you care about! on some older versions of OS X, this would hard-lock the entire UI (for all apps, requiring a reboot or something!), but these days it&#x27;s sufficient to force-quit Terminal)<p>There&#x27;s some wacky stuff out there: <a href="https:&#x2F;&#x2F;www.xfree86.org&#x2F;current&#x2F;ctlseqs.html" rel="nofollow">https:&#x2F;&#x2F;www.xfree86.org&#x2F;current&#x2F;ctlseqs.html</a>
评论 #34888171 未加载
pwgabout 2 years ago
&gt; If you less this txt file, your terminal plays a sound<p>Actually, no it does not. My less displays the bell characters as ^G instead of showing them as raw.<p>Whether you hear the bell, or simply see ^G, depends upon how you have less configured. I leave mine configured to use the caret notation for control characters (which for my version of less, is also the default).
surteenabout 2 years ago
This is Hacker News? A file with ^G in it makes the terminal play a sound?
评论 #34887791 未加载
评论 #34888367 未加载
hsbauauvhabzbabout 2 years ago
I’ve always been curious if mangling stdout or stderr can trigger bad actions, when cat-ing a binary file I occasionally see control characters on my prompt, could I get it to somehow type ‘rm -rf &#x2F;‘?
评论 #34887716 未加载
评论 #34887657 未加载
评论 #34887724 未加载
评论 #34887641 未加载
igniteabout 2 years ago
That&#x27;s because it has the beep character, which is non-visible, on lines 3 through 7<p>The beep character is control-g, ASCII 0x07
junonabout 2 years ago
Person learns about the bell character, more at eleven.
mtmailabout 2 years ago
I&#x27;m guessing it contains <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Bell_character" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Bell_character</a> ?
mdmglrabout 2 years ago
A good reminder to practice good opsec to be weary of packages that instruct you to `curl &lt;url&gt; | bash`. You never know what you&#x27;re running.
评论 #34889896 未加载
jdeatonabout 2 years ago
Jokes on you my volume is off.
chompabout 2 years ago
0x07 = Bell