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

355 pointsby giladover 3 years ago

34 comments

RMPRover 3 years ago
I used to think exa was a good ls replacement, but I found out that it&#x27;s significantly slower than ls[0]. Heck, it&#x27;s even slower than lf[1]. Quite frankly I didn&#x27;t know what to think, but I removed the alias ls=exa.<p>0: <a href="https:&#x2F;&#x2F;asciinema.org&#x2F;a&#x2F;454216" rel="nofollow">https:&#x2F;&#x2F;asciinema.org&#x2F;a&#x2F;454216</a> vs <a href="https:&#x2F;&#x2F;asciinema.org&#x2F;a&#x2F;454217" rel="nofollow">https:&#x2F;&#x2F;asciinema.org&#x2F;a&#x2F;454217</a><p>1: <a href="https:&#x2F;&#x2F;asciinema.org&#x2F;a&#x2F;454213" rel="nofollow">https:&#x2F;&#x2F;asciinema.org&#x2F;a&#x2F;454213</a>
评论 #29618666 未加载
评论 #29617711 未加载
评论 #29617449 未加载
评论 #29618636 未加载
评论 #29617155 未加载
评论 #29620036 未加载
评论 #29621537 未加载
评论 #29621516 未加载
评论 #29620890 未加载
评论 #29619121 未加载
wruzaover 3 years ago
Non-positive opinion ahead.<p>Personally I can’t find a use for it. Colors are so vast that I can’t figure out which means what (and they rarely play nice with a custom bg color). And then, <i>all</i> I have to know is whether a file is “-&gt;”, “*”, “&#x2F;“ or “”. Tree+git view could be useful, if not node_modules, .git and other tree spammers. Of course there is an option to ignore, but then my .bashrc grows again while all I need in a project dir is covered by git status -s (yes I can read these capital letters since svn).<p>It is modern in a sense of presentation, and I see how it may appeal to someone, but not in a sense of ls being old or something. It feels to me like a strange tool that does everything but nothing specifically, as if someone always wanted a nice gui file explorer, but had no courage to admit this “lameness”.<p><i>Why spend your time squinting at black and white text?*<p>I usually spend time on colored output trying to read blue&#x2F;lightgreen&#x2F;etc on #444, and because my b&#x2F;w tools are separated by colored PS1, which emphasizes </i>important* things like hostname, user, cwd, exitcode and puts a newline so that each command is lined up and ends with an additional \n. File being a green file or a blue dir is not as important as me patching a wrong instance.
评论 #29621354 未加载
评论 #29620467 未加载
zopaover 3 years ago
I always find pitches like this a little obnoxious:<p>&gt; You list files hundreds of times a day. Why spend your time squinting at black and white text?<p>Uh, `ls` has colors, if you know how or some benevolent distro-maintainer did.<p>Now there&#x27;s a ton of value in sane defaults and cutting out cruft and targeting specific use-cases, so not here to criticize the tool, at all. Just the marketing. Why not talk about what&#x27;s actually special and different about it?
评论 #29617198 未加载
评论 #29618659 未加载
评论 #29617740 未加载
nrvnover 3 years ago
There is a cohort of “replacements” to traditional tools.<p>Check here: <a href="https:&#x2F;&#x2F;github.com&#x2F;ibraheemdev&#x2F;modern-unix" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ibraheemdev&#x2F;modern-unix</a><p>Some of them are great, some are opinionated.
评论 #29619381 未加载
kkirscheover 3 years ago
Both exa and lsd[1] are amazing ls replacements. I personally stuck with lsd as it was easier to alias to ls but great work by exa.<p>1. <a href="https:&#x2F;&#x2F;github.com&#x2F;Peltoche&#x2F;lsd" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Peltoche&#x2F;lsd</a>
评论 #29617082 未加载
评论 #29616867 未加载
Alohaover 3 years ago
This looks great, I submitted a feature request to also show permissions in Octal, which is one of the &#x27;missing features&#x27; I&#x27;ve always considered to be present in ls.<p>It&#x27;s always bugged me that chmod takes octal, but all of the other tools output a more human readable format, and its up to me to do the mental math in my head to convert - I dont know about you, but I&#x27;m bad at doing octal in my head ;-)
评论 #29618406 未加载
评论 #29617513 未加载
评论 #29617215 未加载
lilyballover 3 years ago
Pro tip: if you use fish, don’t alias ls=exa, instead set an abbreviation (abbr). This way you can keep typing ls at the command line and it will turn into exa, but it won’t interfere with other functions.<p>I’m not sure if there’s an equivalent for bash&#x2F;zsh.
faizshahover 3 years ago
The tree feature itself is worth it: <a href="https:&#x2F;&#x2F;the.exa.website&#x2F;features&#x2F;tree-view" rel="nofollow">https:&#x2F;&#x2F;the.exa.website&#x2F;features&#x2F;tree-view</a><p>I always install tree on a new nix machine, might try this one out.
评论 #29615724 未加载
评论 #29616776 未加载
greatgibover 3 years ago
&lt;&lt;exa queries files in parallel, giving you performance on par with ls.&gt;&gt;<p>I think that this is bullshit! Maybe the author thinks that it is really the case, probably tricked by the language, because using async, but in the end, the syscall to read folders is synchronous...
评论 #29617507 未加载
评论 #29617518 未加载
tomxorover 3 years ago
Similarly, i&#x27;m really enjoying broot recently, which isn&#x27;t quite just a replacement of ls which I still use, but it&#x27;s a great way of getting directory listings &#x2F; file listings in one shot, and to be able to launch other stuff form there.<p>I used to use nerdtree in vim, now I just launch vim from broot, which feels like the right way around, because I can use broot for lots of different things.<p>I looks like exa has more colour capabilities though.
评论 #29616932 未加载
chdlrover 3 years ago
if some color and additional hints is all you need, this may be a competitor:<p>alias ll=&#x27;ls -lahF --color=auto&#x27;
评论 #29617964 未加载
评论 #29617567 未加载
vzalivaover 3 years ago
I think the most important feature of `exa` is not what additional information it could show, but rather what it <i>does not</i> show. It makes moden ergonomic choices presenting directory information using omissions, abbreviations, and colours.
gjsman-1000over 3 years ago
If all the coreutils on Linux and Mac had color coding and used more “sane defaults”… I’d be so happy.
fareeshover 3 years ago
I find that if there is even a hint of latency with these types of tools it puts me in a foul mood
otterzover 3 years ago
It&#x27;s always nice to have more alternatives to traditional unix tools&#x2F;commands, especially these new tools written in Rust that are popping up.<p>The website claims exa is a &quot;modern replacement for ls&quot;, but unlike ls it doesn&#x27;t seem to follow the &quot;do one thing&quot; unix concept - the git integration is one reason why. I&#x27;m not sure the git integration is a good idea.
评论 #29617114 未加载
评论 #29618066 未加载
评论 #29617052 未加载
CyberShadowover 3 years ago
I&#x27;m finding the website much more exciting than the tool itself. Which is not a criticism of the tool - the website is just really neat!
awillover 3 years ago
I&#x27;d love to use something like this, but I SSH to a LOT of different *nix systems. My linux desktop, Linux server, Mac work laptop, work Linux servers etc..<p>For me, to take advantage of something like this, I&#x27;d want it everywhere. Otherwise you can&#x27;t use any exa-specific stuff.
评论 #29621669 未加载
medvover 3 years ago
I recently wrote ls + cd replacement myself: <a href="https:&#x2F;&#x2F;github.com&#x2F;antonmedv&#x2F;llama" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;antonmedv&#x2F;llama</a><p>It’s a TUI with fuzzy searching, which helps a lot at navigating in complicated file systems.
ozzythecatover 3 years ago
I used exa for a short while but switched back to using ls. Maybe I was using it wrong, but with my iTerm2 and ohmyzsh profile, I already had colors set the right way, and I couldn’t really see any advantage to using exa.
wavesquidover 3 years ago
If all you want is colours in your `ls` output, then `ls` already has support.<p>1. turn on colours for ls in your shell. In your e.g. .bash_rc add:<p><pre><code> alias ls=&#x27;ls --color=auto </code></pre> 2. if you want more or different colours, you can use the `LS_COLORS` environment variable. There are various pre-made snippets around you may want to use. e.g. <a href="https:&#x2F;&#x2F;github.com&#x2F;trapd00r&#x2F;LS_COLORS" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;trapd00r&#x2F;LS_COLORS</a>
Machaover 3 years ago
I have exa installed, but I don&#x27;t use it as a ls replacement. Instead I have an alias that uses its git + tree view features as a replacement for git status.
random_cynicover 3 years ago
Another pointless &quot;replacement&quot;, that achieves what anyone with a basic knowledge of Unix and shell scripting can put together with couple of aliases and&#x2F;or shell scripts. No thanks. Most of development today is basically about creating remakes&#x2F;replacement of some totally perfect tool and trying to feed off of it&#x27;s popularity. Developer creativity at an all time low.
评论 #29621208 未加载
Shadonototraover 3 years ago
i did a quick test<p>exa -l vs ls -l<p><pre><code> .&#x2F;exa -l &#x2F;home&#x2F;_&#x2F;Downloads 0.00s user 0.01s system 131% cpu 0.010 total ls --color=tty -l &#x2F;home&#x2F;_&#x2F;Downloads 0.00s user 0.00s system 93% cpu 0.003 </code></pre> exa uses +40% cpu usage and is slower.... not good
timetraveller26over 3 years ago
Some people in the comments not understanding how alias work, If you alias ls to exa it&#x27;s only going to affect the environment in your shell&#x2F;prompt. If you run any command that relies on ls it&#x27;s not going to be affected by the alias.<p>Also I prefer lsd or plain ls --color.
CyberRabbiover 3 years ago
The word “modern” has been so thoroughly corrupted and overused to the point of meaninglessness as a software marketing term.<p>I’ve been more productive as a software user taking the term “modern” to be a signal to avoid the software in question instead of a signal to engage with it.
评论 #29621074 未加载
infocollectorover 3 years ago
I&#x27;ve been using natls - has anyone compared that with exa? pros and cons?
myrandomcommentover 3 years ago
I have been using ls-go for awhile now.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;acarl005&#x2F;ls-go" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;acarl005&#x2F;ls-go</a><p>alias ls=&#x27;ls-go -alkSi&#x27;
gkfasdfasdfover 3 years ago
The automatic git status is the killer feature of exa for me. Makes it easy to see what files have been changed, what&#x27;s ignored. etc.
imdsmover 3 years ago
While it looks good, one has to think about the cost of commands. In the same way that certain words slip off the tongue, and others don&#x27;t, so too are certain words or commands easy (or not so easy) to type.<p>`ls` is easy, one keypress from each hand: right index, left middle.<p>`exa` requires three from one hand, likely left index (2), left middle, and requires three row changes.<p>To me, when we&#x27;re going to use a command thousands of times per year, it has to be ergonomic.
评论 #29620249 未加载
mgaunardover 3 years ago
does it have automated paging like git? doesn&#x27;t look like it.
评论 #29616499 未加载
评论 #29615936 未加载
backoncemoreover 3 years ago
Cool project but no real world use case.
ModernMechover 3 years ago
IMO if you want to replace ls it has to be a 2 character command. I can type ls super fast with two hands. exa is really awkward to type.
评论 #29615761 未加载
评论 #29615684 未加载
评论 #29615681 未加载
Maursaultover 3 years ago
Sounds interesting, but the chosen name is unfortunate due to the line editor in vi (ex). Why not dr, or fz, or lsc, or dir_color? I know it isn&#x27;t easy to find names that aren&#x27;t already used, but if aliasing ls, name length couldn&#x27;t matter less.
almaemberover 3 years ago
When a command line tool for listing filed has its own website, you know it&#x27;s too much.<p>Seriously. All I need is a program that can tell me what files there are in a directory. That&#x27;s such a trivial problem.