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.

Exa, a modern replacement for ls

740 pointsby r0mualdalmost 8 years ago

61 comments

krat0sprakharalmost 8 years ago
Wow, the comments in this thread are quite harsh. Even though I might not use it, this looks like an awesome project - kudos to the author for finding (&amp; implementing) ways to improve something as mundane as ls.<p>I&#x27;ve long been stuck on finding a suitable (perfect?) project idea to play with Rust but exa is making me think through again!<p>Thanks for sharing this and also for your screencasts. I&#x27;d definitely spend a lazy evening watching you program exa.
评论 #14925699 未加载
评论 #14924922 未加载
评论 #14926499 未加载
Perceptesalmost 8 years ago
If you&#x27;re interested in learning Rust by watching someone work, the author did several long screencasts of himself working on exa: <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;channel&#x2F;UCoBjY7TeCXzOULdiE40Ig1w" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;channel&#x2F;UCoBjY7TeCXzOULdiE40Ig1w</a>
评论 #14954555 未加载
_jalalmost 8 years ago
It is great to scratch an itch and make something behave exactly as you want it to be - kudos.<p>That said, this is very much not for me. Default-colorized is something I emphatically do not want; defaulting to relative units, ditto. It it were me, the first thing I would do is get rid of &#x27;grid&#x27; display entirely - reading across just doesn&#x27;t work for me. Etc.<p>More prosaically, `ls` is sort of like breathing for me - I do it so much during the average day that I don&#x27;t even think about it. Can&#x27;t say I immediately know every one of the switches, but probably 10 or so variants I use daily are pure muscle memory, and less frequently used things (extended attributes, symlink-deref options, etc.) I can remember without the man page.<p>So in that sense, `ls` is well into the same category as vi for me - I&#x27;m so accustomed to whatever warts there may be that switching would be much more painful than any efficiency gain.
评论 #14924692 未加载
评论 #14924672 未加载
评论 #14926542 未加载
评论 #14924574 未加载
评论 #14926058 未加载
SwellJoealmost 8 years ago
I just noticed the tests and the incredible lengths the author went to in order to effectively test exa. It&#x27;s <i>really</i> impressive. GNU coreutils ls has a pretty good test suite, too ( <a href="http:&#x2F;&#x2F;git.savannah.gnu.org&#x2F;cgit&#x2F;coreutils.git&#x2F;tree&#x2F;tests&#x2F;ls" rel="nofollow">http:&#x2F;&#x2F;git.savannah.gnu.org&#x2F;cgit&#x2F;coreutils.git&#x2F;tree&#x2F;tests&#x2F;ls</a> ), but this goes well above and beyond the call for something so new.
general_pizzaalmost 8 years ago
This is heavily influenced by personal taste, but I don&#x27;t understand the value of having so many elements of the output colorized. File type seems a useful case, everything else in the output of `exa -l` just looks distracting to me. Just my 2 cents.
评论 #14923944 未加载
评论 #14924008 未加载
评论 #14927234 未加载
评论 #14924423 未加载
donatjalmost 8 years ago
I set up $LS_COLORS like 15 years sgo in my .zshrc… and haven&#x27;t had to touch it since. Doesn&#x27;t seem like a huge deal worth replacing it over.
评论 #14924526 未加载
评论 #14924333 未加载
khedoros1almost 8 years ago
&gt; For example, exa prints human-readable file sizes by default (when would you not want that?)<p>When I&#x27;ve got two similar but non-identical files, and I think that the difference between their sizes might be important.<p>That&#x27;s a silly nitpick, though. It&#x27;s not like I lose ls by installing exa. Plus, it&#x27;s a nice excuse to see if I can get cargo working around the corporate firewall.
评论 #14924504 未加载
评论 #14926092 未加载
评论 #14926741 未加载
评论 #14924241 未加载
评论 #14924100 未加载
评论 #14924121 未加载
评论 #14924471 未加载
评论 #14924497 未加载
评论 #14924404 未加载
otterproalmost 8 years ago
It feels like swiss army knife of &#x27;ls&#x27; that tries to do everything in one, and I hope more features are added, such as showing directory size, which would be a killer feature. I hate using &#x27;du&#x27; or &#x27;ncdu&#x27;.<p>I installed in Ubuntu (and WSL) by downloading the zip file and also 1 dependency by `sudo apt-get install libgit2-24&#x27;<p>Edit: It&#x27;s also fast, and I&#x27;m beginning to think Rust is really good for making speedy commandline tool, as I&#x27;m a big fan of &#x27;ripgrep&#x27;, another popular tool written in Rust.
评论 #14924697 未加载
评论 #14924123 未加载
评论 #14924011 未加载
评论 #14925034 未加载
untogalmost 8 years ago
This is cool, but it doesn&#x27;t solve (in fact, exacerbates) my usual complaint with `ls` - I don&#x27;t know what the arguments are. The example on the site is:<p><pre><code> exa -bghHliS </code></pre> Argh! I want to be able to say `ls --size` to get the file sizes. I don&#x27;t want to remember a million arguments.
评论 #14925777 未加载
评论 #14925828 未加载
SwellJoealmost 8 years ago
I love it, but it&#x27;s also kinda angry fruit salad.<p>Colors are good...too many colors is overwhelming. It <i>might</i> be that I&#x27;d come to recognize what the colors mean if I work with it every day, in the same way that I begin to recognize the flow of a program and when a color is &quot;wrong&quot; after using the same syntax highlighting in an editor for a long time. But, I couldn&#x27;t tell you what any of the colors <i>mean</i> in my favorite editors.<p>It&#x27;s more about recognizing when something has the wrong color compared to everything else with that &quot;shape&quot;. e.g. a good example is that in shell scripts, I often put space between the var name, &#x27;=&#x27;, and the value. That&#x27;s not an assignment and can lead to subtle bugs (shellcheck will catch it, too, but I see it clearly in the editor because it doesn&#x27;t highlight as a variable declaration).<p>So, what I&#x27;m getting at is that I&#x27;m pretty sure I&#x27;ll always have to read the actual text to make any sense out of this output; the huge number of colors may just hinder readability. I don&#x27;t know this for sure, but it&#x27;s pretty jarring to look at even with a nice muted color scheme. I love colors in terminals, though, so I&#x27;ll give it a go.
mavhcalmost 8 years ago
exa is hard to type, bad choice of name for something I&#x27;d be typing many times a day
评论 #14925158 未加载
评论 #14923920 未加载
评论 #14924089 未加载
评论 #14923962 未加载
评论 #14923891 未加载
评论 #14923991 未加载
评论 #14925499 未加载
评论 #14925212 未加载
评论 #14924850 未加载
评论 #14925789 未加载
评论 #14923896 未加载
andrewflnralmost 8 years ago
There&#x27;s only one problem with this thing: all the characters are on one hand with a qwerty keyboard! A bit more annoying than ls, where you can practically hit the keys simultaneously. (You want to nitpick the colors, do you? I&#x27;ll show you what real bikeshedding is...) In all seriousness, though, it looks good.
评论 #14926847 未加载
renoxalmost 8 years ago
I find quite funny that the author is so convinced that the use of colors is the &quot;right default&quot;. 1) I&#x27;m colorblind so my view of colors is different from yours. 2) I find that any tool which use many colors suck: there will be a color combination which will be hard to read (for example git log: the sha1 keys are dark red on black, unreadable) but using just a few color is very nice (git diff: 3 colors, one for +, one for - and a third one for the rest, nice!).<p>Also I&#x27;ve seen two times that the color bytes broke something: an expect script was broken by grep&#x27;s colors and colleagues of mine were very confused when two similar commands gave different output, the reason? Colors!<p>So colors by default? Thanks but no thanks.
评论 #14925268 未加载
评论 #14925253 未加载
评论 #14925482 未加载
评论 #14926586 未加载
评论 #14925052 未加载
评论 #14926337 未加载
评论 #14925967 未加载
评论 #14927761 未加载
评论 #14925447 未加载
assafmoalmost 8 years ago
The main problem I can think of is that I&#x27;m so used to type cd and then ls... But OTOH it&#x27;s as simple to fix as alias ls=exa<p>EDIT:<p>&quot;exa prints human-readable file sizes by default (when would you not want that?)&quot;<p>I actually use bytes a lot for certain progress calculations.<p>Also I get an error &quot;exa: error while loading shared libraries: libhttp_parser.so.2.1: cannot open shared object file: No such file or directory&quot; (Ubuntu 17.04)
评论 #14923950 未加载
评论 #14924059 未加载
评论 #14923984 未加载
评论 #14923942 未加载
评论 #14924051 未加载
swiftalmost 8 years ago
The feature I&#x27;d be most interested in here is the integration with git, but I don&#x27;t see an example on the site that demonstrates that. If the author is reading this, could you please add one? (Or maybe point it out, if I&#x27;m just missing it?)
评论 #14925082 未加载
评论 #14924852 未加载
评论 #14925058 未加载
pierrecalmost 8 years ago
&gt;although Rust is cross-platform, I don’t have a Windows machine to develop on...<p>Well, Windows VMs aren&#x27;t hard to come by and they work quite well on any host platform (contrarily to some other OSes <i>cough</i>MacOS<i>cough</i>)<p>A native windows version would be interesting, though I believe people generally shun any prolonged interactive use the windows command line, this kind of tool might be one of the possible remedies against the pain of using it.
评论 #14924397 未加载
评论 #14924563 未加载
评论 #14927480 未加载
pbiggaralmost 8 years ago
This is really cool - bringing the great treatment of `ack` to ls. And can confirm how fast it is!<p>The unix philosophy is a great idea, but it doesn&#x27;t really lead to a good experience. Glad people are making more integrated tools!<p>Oh, and It&#x27;s in homebrew already: `brew install exa`
评论 #14924717 未加载
评论 #14923943 未加载
ameliusalmost 8 years ago
Does it take into account the background color of my xterm so things do not become unreadable?
评论 #14923958 未加载
评论 #14924104 未加载
评论 #14924427 未加载
评论 #14924867 未加载
tadzik_almost 8 years ago
&gt; exa is written in Rust, so it’s small<p>I suspected this would be total bullshit, and it is. Its small binary is a mere 3.4 megabytes. I wonder if I misinterpreted the &quot;small&quot; part.
评论 #14924529 未加载
评论 #14924005 未加载
评论 #14924003 未加载
评论 #14924488 未加载
评论 #14924103 未加载
评论 #14924009 未加载
rc_kasalmost 8 years ago
What do all the colors mean? I wish he would make a little page explaining what I&#x27;m looking at and what each color means.
评论 #14924288 未加载
pmarreckalmost 8 years ago
Receive the feedback, but ignore the haters and do what you feel is right for your brainchild.<p>I&#x27;ve learned some commandline tricks just from reading the comments!
swahalmost 8 years ago
Very interesting - thanks.<p><pre><code> &#x2F;exa&#x2F;src $ cloc . 41 text files. 41 unique files. 0 files ignored. http:&#x2F;&#x2F;cloc.sourceforge.net v 1.60 T=0.10 s (423.5 files&#x2F;s, 64346.3 lines&#x2F;s) ------------------------------------------------------------------------------- Language files blank comment code ------------------------------------------------------------------------------- Rust 41 1152 929 4149 ------------------------------------------------------------------------------- SUM: 41 1152 929 4149 -------------------------------------------------------------------------------</code></pre>
0x006Aalmost 8 years ago
so whats the replacement for sl in that case? can&#x27;t live without it
评论 #14924172 未加载
评论 #14924074 未加载
dsegoalmost 8 years ago
Looks very nice, I&#x27;ve been using K, which has some other cute features (<a href="https:&#x2F;&#x2F;github.com&#x2F;supercrabtree&#x2F;k" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;supercrabtree&#x2F;k</a>), but I&#x27;ll definitely add this to my arsenal.
0xTJalmost 8 years ago
This is cool, I was having trouble with libraries, so I&#x27;m switching my main Linux to Arch.
TomK32almost 8 years ago
A multi-threaded program to list files. The times we are living in...<p>I&#x27;ll give it a try for a few weeks.
tym0almost 8 years ago
I&#x27;ve been using k [1] to get pretty much the same functionalities but, being written in zsh, it&#x27;s terribly slow. Your program looks nice but I would love to have an output closer to k in term of colour [2], at the moment it feels way to noisy to me.<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;supercrabtree&#x2F;k" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;supercrabtree&#x2F;k</a><p>[2] <a href="https:&#x2F;&#x2F;raw.githubusercontent.com&#x2F;supercrabtree&#x2F;k&#x2F;gh-pages&#x2F;file-size-colors.jpg" rel="nofollow">https:&#x2F;&#x2F;raw.githubusercontent.com&#x2F;supercrabtree&#x2F;k&#x2F;gh-pages&#x2F;f...</a>
评论 #14927446 未加载
hepekalmost 8 years ago
.&#x2F;exa-linux-x86_64: error while loading shared libraries: libhttp_parser.so.2.1: cannot open shared object file: No such file or directory<p>Couldnt all the dependencies be statically linked for max portability?
评论 #14924257 未加载
评论 #14924582 未加载
评论 #14924135 未加载
评论 #14924280 未加载
Dowwiealmost 8 years ago
This is great. I&#x27;m switching to exa!<p>I had high hopes with this command but found the git features missing: exa -l --git --time-style=long-iso -T<p>Nonetheless, this displays<p>Hopefully, the author finds this worth the time to support..
评论 #14927628 未加载
sethammonsalmost 8 years ago
so... a mix up of the following:<p>which ls alias ls=&#x27;ls --color=auto&#x27; &#x2F;bin&#x2F;ls<p>tree -L 2<p>git diff --stat<p>git status
评论 #14923753 未加载
评论 #14923733 未加载
评论 #14923828 未加载
steventhedevalmost 8 years ago
Is this intended as a full on ls replacement? As in, does it respect the envvars such as lscolors? Will it silently ignore -h, or will it die violently?
评论 #14923730 未加载
评论 #14923782 未加载
nardialmost 8 years ago
My first thought is that &quot;exa&quot; has all three letters in the left hand. Not nearly as easy to type as &quot;ls&quot;.
Cockbrandalmost 8 years ago
I really dig the very useful output, but I&#x27;d also muchly appreciate an `ls` compatibility mode. Thus, one could put something like `alias ls=&#x27;axa --compat&#x27;` into .profile and wouldn&#x27;t have to re-train their muscle memory. F.e., I&#x27;m personally using `ls -altr` very often, and `axa -altr` will yield me an error.
yosoyalejandroalmost 8 years ago
Very cool project, will replace ls for exa :)
h1dalmost 8 years ago
If you want colors, you can use grc to colorize command outputs not just ls, even MySQL terminal.<p>Some old HN thread. <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=3858954" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=3858954</a>
callaarsalmost 8 years ago
I used it now for a year (maybe more, I can&#x27;t remember) and I find it fantastic. It&#x27;s great, and I can&#x27;t imagine using plain old ls any more. No matter what people say, I love it.
roadbeatsalmost 8 years ago
I already installed &amp; replaced my ls config. Thanks for making it!
kbutleralmost 8 years ago
Interesting that they chose to keep the file name on the right-hand side like ls, and unlike every graphical file manager.<p>The name is the key field and so it should generally be the left-most column.
评论 #14924249 未加载
nightcrackeralmost 8 years ago
For a command that gets typed as often as &#x27;ls&#x27;, choosing &#x27;exa&#x27;, which is typed with one hand only, even worse, with a repeated finger, is kind of a poor choice.
评论 #14926498 未加载
d--balmost 8 years ago
i know this may sound trivial, but I&#x27;d probably never use this just because typing exa is a lot more annoying than typing ls. The three letters are on the left side of the keyboard and on the three rows. Sure I could rename it to something I like, but then I won&#x27;t be able to get used to it, because I won&#x27;t be able to find it when I log on to other computers. It&#x27;s a silly thing that has a serious impact on usability...
xaduhaalmost 8 years ago
No one invented anything better than Commander-type UI for dealing with files. For non-trivial tasks I&#x27;d fire up vifm.
babyalmost 8 years ago
This is amazing! Now:<p>* can you use unicode icons to replace `d` and others with icons of folders and such?<p>* where are the color signification explained?
TedHermanalmost 8 years ago
Surprised no one has suggested replacing permissions display with emoticons.
bsmitalmost 8 years ago
What does &quot;exa&quot; stand for? That&#x27;s what I want to know.
评论 #14924556 未加载
评论 #14924184 未加载
评论 #14924105 未加载
ameliusalmost 8 years ago
What is the usefulness&#x2F;learning_effort ratio of this tool?
评论 #14923827 未加载
lwindyalmost 8 years ago
I honestly just like it, colors make it easier on my eyes
gesmanalmost 8 years ago
$ exa -bghHliS ????<p>How about: $ exa . -- with the same outcome? :)
rv77axalmost 8 years ago
The last thing I want in terminal is colours.
polotealmost 8 years ago
Why do you want to replace ls?
torusalmost 8 years ago
Nice, I like the -T option.
frahsalmost 8 years ago
exa is harder to type than ls, but this looks really cool.
评论 #14926034 未加载
dan-comptonalmost 8 years ago
The name is too long.
peacetreefrogalmost 8 years ago
cool. i feel like this whole thread is the epitome of hacker news comments
rhianna86almost 8 years ago
This looks awesome. Anyone&#x27;s gonna make a PR for ubuntu to add this?
Froyohalmost 8 years ago
Wow I’m quite overwhelmed by the colors
ofalmost 8 years ago
ohh i thought exa was a replacement for the word &#x27;is&#x27;. i was like damn.... that&#x27;s fucking cool.
git-pullalmost 8 years ago
While it&#x27;s not the intention to replace the binary itself, I&#x27;m just not a fan of the idea of substituting <i>system built-ins</i> in everyday behavior. Stuff like cd, ls, etc. I like to keep it to the basics.<p>Even just with PATHs or aliases, or a new binary entirely.<p>And I&#x27;m a person who is no stranger to dot-configs. I&#x27;ve never taken it as far as Z(1), <a href="https:&#x2F;&#x2F;github.com&#x2F;rupa&#x2F;z" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;rupa&#x2F;z</a>.<p>A system builtin is stuff you&#x27;d see stowed away in &#x2F;bin. They are essential low level binaries you have to trust. If somehow a malicious ls got out there, nothing&#x27;s stopping people from writing memory-safe malware that uploads your $HOME configs to some server in a far away land.<p>The more I say this, I guess defaulting to a substitute for a builtin command doesn&#x27;t matter. The average developer relies on so much third party stuff in their shell, vim, package manifests, and so on that all these years could have done bad stuff, nothing has happened.<p>Maybe it&#x27;s my defense mechanism firing that my own dot-config has grown so big I don&#x27;t remember what the hell&#x27;s in it anymore.<p>In fact, it&#x27;s a common thing for terminal applications to accept environmental variables to use third party applications. For instance, $EDITOR, and less often (but no less useful): $PAGER. You can give it a shot with most(1) [1], I mention it in my book, <i>The Tao of tmux</i> [2] (available free to read online).<p>So also, regarding $EDITOR, if you prefer that being in GNU nano, Pico, Vim, or emacs, set it in your .bashrc&#x2F;.zshrc:<p>export EDITOR=vim<p>Also, for git&#x27;s editor, I don&#x27;t remember if it falls back to $EDITOR, but you can do:<p>export GIT_EDITOR=vim<p>Another tool at your disposal for ls(1), which even FreeBSD supports, it $LS_COLORS:<p><a href="http:&#x2F;&#x2F;man7.org&#x2F;linux&#x2F;man-pages&#x2F;man5&#x2F;dir_colors.5.html" rel="nofollow">http:&#x2F;&#x2F;man7.org&#x2F;linux&#x2F;man-pages&#x2F;man5&#x2F;dir_colors.5.html</a><p>edit: actually, BSD&#x27;s ls(1) seems to be $LSCOLORS (<a href="https:&#x2F;&#x2F;www.freebsd.org&#x2F;cgi&#x2F;man.cgi?query=ls&amp;sektion=1" rel="nofollow">https:&#x2F;&#x2F;www.freebsd.org&#x2F;cgi&#x2F;man.cgi?query=ls&amp;sektion=1</a>):<p>[1] <a href="http:&#x2F;&#x2F;www.jedsoft.org&#x2F;most&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.jedsoft.org&#x2F;most&#x2F;</a><p>[2] <a href="https:&#x2F;&#x2F;leanpub.com&#x2F;the-tao-of-tmux&#x2F;read#leanpub-auto-read-the-tmux-manual-in-style" rel="nofollow">https:&#x2F;&#x2F;leanpub.com&#x2F;the-tao-of-tmux&#x2F;read#leanpub-auto-read-t...</a>
评论 #14924169 未加载
评论 #14924149 未加载
评论 #14924261 未加载
axaxsalmost 8 years ago
i&#x27;m not going to be rude or hate exa, it looks really cool actually. I, for one, love the color coding. But trying to replace something as old and known as &#x27;ls&#x27; probably isn&#x27;t a realistic goal. I think talents would much better geared towards something missing, instead. Either way, keep up the good work.
jwilkalmost 8 years ago
&gt; Git support: View the staged and unstaged status of every file, right there in the standard view. Also works in tree view.<p>This is nearly impossible to implement securely.<p>Better don&#x27;t run exa against untrusted directories.
评论 #14924275 未加载
评论 #14924077 未加载
tariandbarialmost 8 years ago
To the author: As you are already making a much more user and human friendly version of ls (like making ls -h the default behavior) please consider placing the name of the file on the <i>left</i> most column<p><pre><code> inode Permissions Links Size Blocks User Group Date Modified Name</code></pre> 21214836 .rw-r--r-- 1 9.4Ki 24 ben staff 29 Jun 16:16 Cargo.lock<p>As a human I first care for the <i>name</i>, Currently I&#x27;m forced to scan the right most column (which position varies) and then travel back to the beginning of the line and read the rest of the metadata
评论 #14927864 未加载
kabdibalmost 8 years ago
Color is one of the first things I turn off. So many tools color files in ways that are very difficult to read (dark blue against a black background, really?)<p>I&#x27;m colorblind, too, so your red&#x2F;orange&#x2F;green distinctions are utterly wasted on me. Raw color is a very flaky and low fidelity way to communicate to a user.<p>Animation, on the other hand: Give that super important file that&#x27;s somehow busted or very active some kind of blink or a meaningful animation and you&#x27;ll have my attention. I may hate the tool for it, but you&#x27;ll have my attention...
评论 #14927736 未加载