14 ms·
Exa - A Modern Replacement for ls
- chdlr 5y agoif some color and additional hints is all you need, this may be a competitor: alias ll='ls -lahF --color=auto'
- tgv 5y agoI must be one of the few, but I rarely like color output. And then some throw in underline or bold, but in e.g. ls (or exa) almost none of the make-up adds information, yet everything shouts for attention. I turn most of it off, rather than on.
- enobrev 5y agoThis is the first alias I create on any os I use daily. Although I order the switches as `halF` as it's easier to remember for quick one-off use on servers (and containers). It's practically muscle memory for me now.
- faizshah 5y agoThe tree feature itself is worth it: https://the.exa.website/features/tree-view https://the.exa.website/features/tree-view I always install tree on a new nix machine, might try this one out.
- dystroy 5y agoWhat about a tree which automatically fills the available height of the console, while staying balance ? Look at https://dystroy.org/broot/tricks/ https://dystroy.org/broot/tricks/
- faizshah 5y agoWow, I haven't heard of this one, thanks for the suggestion gonna try this out tomorrow. I usually pipe to less but this could be nicer.
- RMPR 5y agoIt's the tree feature that made me investigate the speed of exa (see my other comment in this thread) because it was very slow. Otherwise I agree, exa is neat.
- gjsman-1000 5y agoIf all the coreutils on Linux and Mac had color coding and used more “sane defaults”… I’d be so happy.
- ModernMech 5y agoIMO 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.
- creamytaco 5y agoalias .. but exa is not backwards compatible with ls OOPS Which is why I stick with ls (and grep instead of rg and coreutils instead of shiny rust equivalent), I can't deal with the cognitive dissonance that arises from these differences.
- incanus77 5y agoI aliased `ls` to it… I don’t know how long ago. It’s been great.
- nsonha 5y agowhat can break when you alias standard system command name to some random program downloaded from the internet.
- O_H_E 5y agoone-liners you copy and paste! no seriously, when you properly alias something in your .bashrc, they only take effect in an interactive shell. ie: an `alias ll='ls -halF' in your bashrc does not work if you do `bash -c 'll' nor `./fileThatContainsll`
- omgmajk 5y agoI have 'lsd -al' aliased as 'l', it works fantastic.
- kkirsche 5y agoBoth 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. 1. https://github.com/Peltoche/lsd https://github.com/Peltoche/lsd
- UkiahSmith 5y agoI prefer lsd over exa because the flags are more compatible with standard ls
- zingplex 5y agoI think that's what OP means by “easier to alias”
- varenc 5y agoAgreed. I gave up on exa because `ls -tr` doesn’t work.
- hohum 5y agoYou mean like this? https://i.imgur.com/g4hl1Rg.png https://i.imgur.com/g4hl1Rg.png alias ls="exa -h --group-directories-first --icons -g $@ --git --color always"
- varenc 5y agoThat seems different than sorting by time? My minor exa gripe is described here: https://github.com/ogham/exa/issues/519 https://github.com/ogham/exa/issues/519 Lots of workarounds, even more available now, but I ended up switching to lsd and love it. I like the file type icons.
- thanatos519 5y agoI tried both and ended up with lsd, but both have my favourite feature which is the icons via Nerd Fonts.
- mgaunard 5y agodoes it have automated paging like git? doesn't look like it.
- lancebeet 5y agoCan't you just do something like if [[ -p /dev/stdout ]]; then ls; else ls | less -F -R; fi
- efdee 5y agoPeak HN right here.
- timmytokyo 5y agoYou lose the colors by piping through less.
- eMSF 5y agoNo you do not. Also, unless I'm mistaken, git uses the system pager for pagination and that happens to be less on almost all modern Linux systems (and many others).
- ajdude 5y agoIt depends. Most of the coreutils won't send color if you're piping unless you explicitly tell it to do so. ls is one of those; try --color=always instead of --color=auto, and be sure to use "less -R" on the other side of the pipe.
- CyberShadow 5y agoI think, except for very large volumes, automated paging is inferior to terminal scrollback. It is conditionally modal (thus conflicts with muscle memory) and you can't see previous output and the paged output at the same time (quitting the pager restores the terminal contents). I turned mine off in Git.
- vzaliva 5y agoI think the most important feature of `exa` is not what additional information it could show, but rather what it does not show. It makes moden ergonomic choices presenting directory information using omissions, abbreviations, and colours.
- infocollector 5y agoI've been using natls - has anyone compared that with exa? pros and cons?
- CyberShadow 5y agoI'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!
- tomxor 5y agoSimilarly, i'm really enjoying broot recently, which isn't quite just a replacement of ls which I still use, but it's a great way of getting directory listings / file listings in one shot, and to be able to launch other stuff form there. 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. I looks like exa has more colour capabilities though.
- tcoff91 5y agoI think that fuzzy finding is a much better way to open files than browsing a directory tree. fzf is an amazing tool for this.
- RMPR 5y agoI used to think exa was a good ls replacement, but I found out that it's significantly slower than ls[0]. Heck, it's even slower than lf[1]. Quite frankly I didn't know what to think, but I removed the alias ls=exa. 0: https://asciinema.org/a/454216 https://asciinema.org/a/454216 vs https://asciinema.org/a/454217 https://asciinema.org/a/454217 1: https://asciinema.org/a/454213 https://asciinema.org/a/454213
- authed 5y agothe --tree feature is incredibly slow
- 3836293648 5y agoComparing tree to exa --tree, they're not that different in total runtime, it's just that exa doesn't print till it's done while tree prints as it goes and it feels so much worse (to use exa)
- mikkelam 5y agoThat does seem rather bad, I wonder what is causing such shitty performance?
- kreetx 5y agoMake it work, make it correct, make it fast - perhaps they haven't reached phase three yet?
- Narishma 5y agoThen they shouldn't market it as being fast.
- xxpor 5y agoI'm willing to bet it's the fact that they're in a git repo. exa checks git status iirc, and of course ls doesn't. I'll try to repro it. Edit: Hmm, interesting. Certainly a lot slower, but not enough that I'd really notice unless I was doing this constantly: time ls real 0m0.228s user 0m0.145s sys 0m0.082s time exa real 0m1.209s user 0m1.124s sys 0m0.084s
- otterz 5y agoIt's always nice to have more alternatives to traditional unix tools/commands, especially these new tools written in Rust that are popping up. The website claims exa is a "modern replacement for ls", but unlike ls it doesn't seem to follow the "do one thing" unix concept - the git integration is one reason why. I'm not sure the git integration is a good idea.
- w-j-w 5y agoexa isn't a scripting tool designed to be tied together with other scripting tools that also only do one thing. I think that it's probably better to consider the end user experience rather than the catchy parts of a design made decades ago for an entirely different context.
- lancebeet 5y agoDoes ls really follow the unix philosophy though? GNU ls can show file permissions, modification timestamp, author, size, sort the listing etc. It does a lot more than a simple directory listing. We've just gotten used to its current extra functionality.
- bayindirh 5y agoFile permissions, inode number, dates associated with a file are all features of the files, and it's natural to be a part of a directory/file lister. One can always create separate tools for all the extra functionality in ls, however without the file name, associating all the information would be hard, so if these properties need a file name to be meaningful, why not add it into a single tool? It's not like ls is changing group/owner, mode, or modifying timestamps or doing filesystem dependent things. It just lists files, with a bunch of extra information, if you want.
- alerighi 5y agoFile permission, timestamps and other stuff are things that a directory listing program should show you. Regarding sorting, one can say that you can pipe the output to sort. True, but less efficient. Most filesystem implementation already give you the directory listing sorted in alphabetical order. So ls can be aware of that cases and simply give you the sorted list as returned by the operating system, in case one of that filesystem is used, without wasting time sorting an already sorted list.
- nrvn 5y agoThere is a cohort of “replacements” to traditional tools. Check here: https://github.com/ibraheemdev/modern-unix https://github.com/ibraheemdev/modern-unix Some of them are great, some are opinionated.
- typon 5y agoI wrote an interactive sed replacement: https://github.com/typon/tabdeeli https://github.com/typon/tabdeeli
- zopa 5y agoI always find pitches like this a little obnoxious: > You list files hundreds of times a day. Why spend your time squinting at black and white text? Uh, `ls` has colors, if you know how or some benevolent distro-maintainer did. Now there'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's actually special and different about it?
- bayindirh 5y agoWhen the motivation about replacing something is just colors/icons and other fluff, I just don't consider the tool worth it. Also, changing default tools are fine for a single system, but when you're managing many, and with a team, that's a big no no.
- thebeardisred 5y agoThanks for writing the bulk of my comment for me. :) The thing I would add is that tools like this cater to introductory users, not power users. They're for the person who tweaks every cosmetic default to the point where they need a setup of "dotfiles" to be functional. Meanwhile, tools like this often skip over important implementation details like extended file-system attributes.
- userbinator 5y agoI actually prefer my ls output to be monochrome, and the first time I encountered a coloured one I turned it off since some of the colours were nearly unreadable (who thought dark blue and gray on black was a good idea?)
- jagger27 5y agoThat’s not ls’s fault. That’s just your terminal's colour scheme.
- backoncemore 5y agoCool project but no real world use case.
- Aloha 5y agoThis looks great, I submitted a feature request to also show permissions in Octal, which is one of the 'missing features' I've always considered to be present in ls. It'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'm bad at doing octal in my head ;-)
- Hendrikto 5y agochmod also takes human readable notation as input, as in chmod g+w,o-rx …
- tgv 5y agoOne octal digit comprises three bits: read, write and execute, with values 4, 2, and 1. Add them and you get the octal digit: 7 is everything permitted, 4 is read-only. The three octal digits represent permission for owner, group and the rest. So stay way from 777.
- Aloha 5y agoI set permissions on something just infrequently enough that I dont have that as muscle memory, and often I need to match permissions on something already there, so I'm trying to go "uhhh, its, rwxr-xr-x what does that translate to again?" Also, frankly, the computer is a calculator, why not have it act as the calculator for me, and tell me what the permissions already are, I can read the octal permissions and know what they mean.
- greatgib 5y ago<<exa queries files in parallel, giving you performance on par with ls.>> 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...
- ericbarrett 5y agoThe syscall to list a directory is synchronous, but the follow-up stat calls to read file attributes (type, permission, attributes, size) are done one file at a time, so there are opportunities for parallelization. Incidentally, this is why ls without colors or type symbols (-l, -F, --color, and so forth) is a lot faster: it doesn't have to query every file to find out what it is in order to display the color/symbol/permissions/etc. Handy if you're on a slow networked file system and just need to see names.
- edwintorok 5y agoIt would be better if it used fstatat instead of regular stat calls. On a deeply nested directory it can make a difference (e.g. a single-threaded 'find' easily beats a parallel 'fd' with warm caches on my machine, 'exa' could similarly benefit)
- userbinator 5y agoI don't see how parallelism could work with stat() in general, since the OS has to keep the FS structures consistent and ultimately there is only one disk to read from, unless you have RAID.
- vidarh 5y agoDepends how much of the overhead is context switches vs. the disk IO. Really something that needs benchmarking.
- mhio 5y agoFilling the disk queue usually helps with the IO throughout part, sequential stats not attempting to queue requests will never saturate the bandwidth of a modern device. There's also the page cache involved for reads, so it can be read while actual IO is queued.
- ozzythecat 5y agoI 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.
- gkfasdfasdf 5y agoThe automatic git status is the killer feature of exa for me. Makes it easy to see what files have been changed, what's ignored. etc.
- Shadonototra 5y agoi did a quick test exa -l vs ls -l ./exa -l /home/_/Downloads 0.00s user 0.01s system 131% cpu 0.010 total ls --color=tty -l /home/_/Downloads 0.00s user 0.00s system 93% cpu 0.003 exa uses +40% cpu usage and is slower.... not good
- lilyball 5y agoPro 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. I’m not sure if there’s an equivalent for bash/zsh.
- fareesh 5y agoI find that if there is even a hint of latency with these types of tools it puts me in a foul mood
- medv 5y agoI recently wrote ls + cd replacement myself: https://github.com/antonmedv/llama https://github.com/antonmedv/llama It’s a TUI with fuzzy searching, which helps a lot at navigating in complicated file systems.
- wruza 5y agoNon-positive opinion ahead. 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, all I have to know is whether a file is “->”, “*”, “/“ 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). 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”. Why spend your time squinting at black and white text?* I usually spend time on colored output trying to read blue/lightgreen/etc on #444, and because my b/w tools are separated by colored PS1, which emphasizes 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.
- hresvelgr 5y agoI'm going to tack on my non-positive and potentially nonconstructive opinion here. This is absolutely frivolous and a problem looking for a solution. It _is_ a modern replacement for `ls` in that it fulfills the creator's aesthetic desires for the program and solves none of the issues present with the original (in which there are close to zero).
- jaredsohn 5y ago>problem looking for a solution solution looking for a problem
- ncmncm 5y agoAnyway, kudos to them for not mentioning Rust.
- mysakepa 5y agoIt's pretty much a given now that "modern" replacements for basic Unix utilities are written in Rust.
- Maursault 5y agoSounds 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't easy to find names that aren't already used, but if aliasing ls, name length couldn't matter less.
- imdsm 5y agoWhile 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't, so too are certain words or commands easy (or not so easy) to type. `ls` is easy, one keypress from each hand: right index, left middle. `exa` requires three from one hand, likely left index (2), left middle, and requires three row changes. To me, when we're going to use a command thousands of times per year, it has to be ergonomic.
- DannyBee 5y agoUh, alias it to whatever you want?
- almaember 5y agoWhen a command line tool for listing filed has its own website, you know it's too much. Seriously. All I need is a program that can tell me what files there are in a directory. That's such a trivial problem.
- CyberRabbi 5y agoThe word “modern” has been so thoroughly corrupted and overused to the point of meaninglessness as a software marketing term. 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.
- Narishma 5y ago"fast" seems to be another such word, especially when not accompanied with benchmarks.
- random_cynic 5y agoAnother pointless "replacement", that achieves what anyone with a basic knowledge of Unix and shell scripting can put together with couple of aliases and/or shell scripts. No thanks. Most of development today is basically about creating remakes/replacement of some totally perfect tool and trying to feed off of it's popularity. Developer creativity at an all time low.
- vertak 5y agoIt is an abstraction that can save any users from having to think about shell scripts. This is incredibly valuable. We should not waste human time on writing and thinking about shell scripts, there are much bigger problems to solve.
- hohum 5y agoThis. It's why I left emacs behind. I didn't want my entire life's body of work to be "a customized text editor."
- random_cynic 5y agoAre you serious? Writing a shell script or thinking about ways of tweaking stuff is not valuable but wasting time reinventing wheel is? You're the perfect example why there is a complete lack of creativity. Everyone is about making pointless abstractions no actual substance.
- vertak 5y agoAll software is an abstraction and that’s what makes it useful. It sounds like you have a particularly vindictive axe to grind against all the “pointless abstractions” people have poured hours of their time into so I’m sure I won’t convince you. But to other readers, it doesn’t have to be this painfully divisive.
- awill 5y agoI'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.. For me, to take advantage of something like this, I'd want it everywhere. Otherwise you can't use any exa-specific stuff.
- O_H_E 5y agoI'll just drop these here as they might be useful to you https://github.com/xxh/xxh https://github.com/xxh/xxh https://github.com/intoli/exodus https://github.com/intoli/exodus
- timetraveller26 5y agoSome people in the comments not understanding how alias work, If you alias ls to exa it's only going to affect the environment in your shell/prompt. If you run any command that relies on ls it's not going to be affected by the alias. Also I prefer lsd or plain ls --color.
- Macha 5y agoI have exa installed, but I don'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.
- wavesquid 5y agoIf all you want is colours in your `ls` output, then `ls` already has support. 1. turn on colours for ls in your shell. In your e.g. .bash_rc add: alias ls='ls --color=auto 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. https://github.com/trapd00r/LS_COLORS https://github.com/trapd00r/LS_COLORS
- myrandomcomment 5y agoI have been using ls-go for awhile now. https://github.com/acarl005/ls-go https://github.com/acarl005/ls-go alias ls='ls-go -alkSi'