TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Hexyl: A command-line hex viewer with colorized output

212 点作者 hundredwatt将近 2 年前

18 条评论

faitswulff将近 2 年前
Sharkdp is also responsible for some fantastic tools like hyperfine for micro benchmarking, fd for finding files, bat which is a colorized cat replacement and many more such utilities. <a href="https:&#x2F;&#x2F;github.com&#x2F;sharkdp">https:&#x2F;&#x2F;github.com&#x2F;sharkdp</a> is a real treasure trove of user-friendly CLI tools.
评论 #36361271 未加载
WalterBright将近 2 年前
Here&#x27;s mine, from 1986 or so. I still use it all the time:<p><pre><code> #include &lt;stdio.h&gt; #define O1O printf #define OlO putchar #define O10 exit #define Ol0 strlen #define QLQ fopen #define OlQ fgetc #define O1Q abs #define QO0 for typedef char lOL; lOL*QI[] = {&quot;Use:\012\011dump file\012&quot;,&quot;Unable to open file &#x27;\x25s&#x27;\012&quot;, &quot;\012&quot;,&quot; &quot;,&quot;&quot;}; main(I,Il) lOL*Il[]; { FILE *L; unsigned lO; int Q,OL[&#x27; &#x27;^&#x27;0&#x27;],llO = EOF, O=1,l=0,lll=O+O+O+l,OQ=056; lOL*llL=&quot;%2x &quot;; (I != 1&lt;&lt;1&amp;&amp;(O1O(QI[0]),O10(1011-1010))), ((L = QLQ(Il[O],&quot;r&quot;))==0&amp;&amp;(O1O(QI[O],Il[O]),O10(O))); lO = I-(O&lt;&lt;l&lt;&lt;O); while (L-l,1) { QO0(Q = 0L;((Q &amp;~(0x10-O))== l); OL[Q++] = OlQ(L)); if (OL[0]==llO) break; O1O(&quot;\0454x: &quot;,lO); if (I == (1&lt;&lt;1)) { QO0(Q=Ol0(QI[O&lt;&lt;O&lt;&lt;1]);Q&lt;Ol0(QI[0]); Q++)O1O((OL[Q]!=llO)?llL:QI[lll],OL[Q]);&#x2F;*&quot; O10(QI[1O])*&#x2F; O1O(QI[lll]);{} } QO0 (Q=0L;Q&lt;1&lt;&lt;1&lt;&lt;1&lt;&lt;1&lt;&lt;1;Q+=Q&lt;0100) { (OL[Q]!=llO)? &#x2F;* 0010 10lOQ 000LQL *&#x2F; ((D(OL[Q])==0&amp;&amp;(*(OL+O1Q(Q-l))=OQ)), OlO(OL[Q])): OlO(1&lt;&lt;(1&lt;&lt;1&lt;&lt;1)&lt;&lt;1); } O1O(QI[01^10^9]); lO+=Q+0+l;} } D(l) { return l&gt;=&#x27; &#x27;&amp;&amp;l&lt;=&#x27;\~&#x27;; } </code></pre> I do like the colorized output of hexyl, though.
评论 #36363151 未加载
评论 #36368089 未加载
denysvitali将近 2 年前
If you want a true Hex Editor (or better, Hex IDE), I strongly suggest you to take a look ad ImHex [1].<p>[1]: <a href="https:&#x2F;&#x2F;github.com&#x2F;WerWolv&#x2F;ImHex">https:&#x2F;&#x2F;github.com&#x2F;WerWolv&#x2F;ImHex</a>
评论 #36365795 未加载
评论 #36365817 未加载
BlackLotus89将近 2 年前
Was looking at hexdump alternatives a week ago and between huxdemp (hxd), xxd, hx, hd (not the alias for hexdump -C) and hexdump this was my favourite.<p>hx wasn&#x27;t usable when parsing data streams... And clashes with helix (hx)<p>On systems where I can&#x27;t install anything I would just use hexdump -C or xxd
评论 #36362661 未加载
jbaber将近 2 年前
Hexyl&#x27;s lovely and I copied its style for a hex editor.<p>I don&#x27;t understand why there are so many terminal hex viewers that don&#x27;t edit.
评论 #36362074 未加载
Conscat将近 2 年前
Hexyl is what I love to use for quickly looking at a file. For slightly more serious introspection I use Emacs&#x27; hexl-mode, which also has basic editing capabilities.
crabbone将近 2 年前
Why would you need a <i>separate</i> binary viewer &#x2F; editor?<p>This reminds me the absurd, but somehow common situation where Java programmers in my office used IntelliJ IDEA to write Java, but Notepad++ to view logs or edit INI files etc.
评论 #36366983 未加载
评论 #36367640 未加载
评论 #36364749 未加载
评论 #36364439 未加载
dang将近 2 年前
Related:<p><i>Hexyl: A command-line hex viewer</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=18865264">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=18865264</a> - Jan 2019 (113 comments)
stusmall将近 2 年前
I really like this tool for quick, easy debugging on binary files. okteta used to be my go to, but it&#x27;s rare I need editing. I&#x27;m usually just take a quick look at the contents.
fuzztester将近 2 年前
I&#x27;ve used the XVI32 hex editor for Windows in the past.<p>Written in Delphi.<p>Split pane.<p>Useful app. Free.
评论 #36364848 未加载
评论 #36364895 未加载
panzi将近 2 年前
Cool idea with the color!<p>But for my needs the hex viewer that I&#x27;ve wrote works best. I need those number displays at the bottom and an easy way to go to relative and absolute offsets. See the screenshot at the bottom: <a href="https:&#x2F;&#x2F;github.com&#x2F;panzi&#x2F;rust-hox">https:&#x2F;&#x2F;github.com&#x2F;panzi&#x2F;rust-hox</a>
AdieuToLogic将近 2 年前
See also: xxd[0]<p>0 - <a href="https:&#x2F;&#x2F;man.freebsd.org&#x2F;cgi&#x2F;man.cgi?query=xxd&amp;apropos=0&amp;sektion=0&amp;manpath=FreeBSD+13.2-RELEASE+and+Ports&amp;arch=default&amp;format=html" rel="nofollow noreferrer">https:&#x2F;&#x2F;man.freebsd.org&#x2F;cgi&#x2F;man.cgi?query=xxd&amp;apropos=0&amp;sekt...</a>
some_random将近 2 年前
I love hexyl, but the colorized output does get in the way sometimes when I&#x27;m copying out bytes
评论 #36361784 未加载
评论 #36368492 未加载
CodeWriter23将近 2 年前
When I was coming up, we didn’t have no dashed lines dividing the displays into 8-byte segments. And color? Everything was orange text on black. If you wanted green on black, you used a coworker’s terminal.
评论 #36370254 未加载
评论 #36363910 未加载
chx将近 2 年前
Strongly related: is there a hex viewer where I can set , preferably on-the-fly or with a command line switch record delimiters so it colors the records?
评论 #36363928 未加载
vram22将近 2 年前
$ od -cx file<p>or<p>$ other_command_or_pipeline | od -cx<p>is from early versions of Unix. Prints both character and hexadecimal representation of each byte in the input.<p>$ man od
评论 #36366275 未加载
camel-cdr将近 2 年前
Does it handle files larger than memory? I&#x27;ve been using dhex for that purpose.
评论 #36362829 未加载
VikingCoder将近 2 年前
Makes me fondly remember XTree...