Live data from Hacker News

Exa: An alternative to Ls

the.exa.website

71–80 of 105 posts

Re: Exa: An alternative to Ls

#71

Earlier quoted context omitted.

Is what you're looking for (re: --full-time) not `exa -l --time-style=full-iso`?

`exa -l --time-style=full-iso' truncates the timestamps to millisecond resolution. `ls --full-time" gives the timestamps as they are stored by the file system, without alteration. For example the xfs timestamps and the FreeBSD ufs timestamps have nanosecond resolution.

This is what I get running `exa -l --time-style=full-iso` on my ext4 system: `drwxr-xr-x - kosa 2021-09-02 12:20:39.114446860 -0400 Desktop`

Unless it's different on xfs/ufs, this seems to be nanosecond resolution to me,

Re: Exa: An alternative to Ls

#72

I've been loving all the new rust-based CLI tools; you can find a lot of them here [0]. So far I've used ripgrep, fd-find, sd, exa, bat. I care less about speed and more about ease-of-use and beautiful output. Another bonus is standardized tooling between Mac and Linux; little bsd differences have been driving me nuts since I took a job that forced me into a MacBook, but these tools solve that issue and are easy to i…

The standardized tooling is called POSIX, and you already have it installed — it’s easy enough to train the GNUisms out of your fingers and it will reward you in the end.

Re: Exa: An alternative to Ls

#73
post #70

alias ls='ls -vF' This way you'll see directories and executables in a glance. No need for colors, or fancy ls replacements.

Grouping/sorting also enhances human readability, and the options for this in GNU ls are quite limited.

Re: Exa: An alternative to Ls

#74
post #36

The main thing I use Exa for is as a better "tree": et() { exa -alT --git -I'.git|node_modules|.mypy_cache|.pytest_cache|.venv' --color=always "$@" | less -R; } alias et1='et -L1' alias et2='et -L2' alias et3='et -L3' Exa is great for this because it shows file details along with the tree hierarchy. (I have to manually specify a bunch of git-ignores because Exa's git ignore support doesn't work properly.)

Love this! Stole it and added a bit of bash-fu to it to avoid needing to define the extra aliases:

et() { exa -alT --git -I'.git|node_modules|.mypy_cache|.pytest_cache|.venv' --color=always "-L${1:-1}" | less -R }

commands would now be, e.g. "et 2" instead of "et2", but will work with any number. defaults to 1 if just "et" is run with no argument.

Re: Exa: An alternative to Ls

#75
post #24
post #6

This page doesn’t actually list any features or explain why you should use exa instead of ls. The homepage [0] is more useful in this regard. 0: https://the.exa.website/

Did the link get edited or something? OP takes me to https://the.exa.website/introduction , which has a nice tutorial with all of the features and how to install.

No? That "introduction" link mentions 2 differences: "The computer is no longer the bottleneck." -> exa runs stat() calls; and "256-colour terminals are everywhere." -> exa uses color by default.

But the thing is, if you install any modern system (ubuntu or fedora or pretty much anything else) and type "ls", it does those two things as well! Your default config will alias ls to enable color by default, and this ls invocation will be doing stat on every page.

So anyone who knows "ls" even a bit would, on looking on that particular page, say, "Huh? That's your special feature? my ls does this already and I don't have to do anything to install it. [close window]"

To reiterate, EXA does have features that "ls" does not. It just that https://the.exa.website/introduction page does not list those features at all. If you want to convince people to switch to EXA, you better point them to a different page.

Re: Exa: An alternative to Ls

#76
post #39

Still defaults to the unreadable multicolumn view. Yuck! Why is this the default in ls? Why would anyone keep this awful default in another tool? It's so heinous.

I don't get why that's a problem, it allows you to see many many more files at first glance. Back when I switched from DOS (which does have the single column view as default for the "dir" command) to Linux, it was quite a revelation. The overwhelming amount of time I don't need to see ownership/permission and modification time?

With `lc` you can have customized format strings so that you can see "size name", or "perms size name" or any subset/reordering of the report columns. And all of these are rolled up into a multi-column layout, though you can control how many columns you want with, e.g. lc -n3.

(Never mind the glob-abbreviation ability which while slow allows packing an enormous number of names per terminal row.)

Re: Exa: An alternative to Ls

#77

> You list files hundreds of times a day. Why spend your time squinting at black and white text? I don't spend any time squinting... And personally the bright colors shown in the example are harder on my eyes than the shades of gray I've selected in my terminal emulator. I also work with a large number of systems, and prefer to work from muscle memory with the tooling that is installed by default 100% of the time. Pa…

When I wear prism glasses I have to mute the colors to bear black and white otherwise I get weird text hovering. Different colors come forward backwards.

Re: Exa: An alternative to Ls

#78
post #69

I wish the authors thought a little bit more about the actual physicality of typing out commands. `exa` on a QWERTY keyboard is typed on one hand, across three rows, and with the weakest fingers. I guess I could put this into muscle memory, but I expect an `ls` like command to be ergonomic to some degree and I see myself making a lot of typos.

This is a basic flaw in the design of unix. The user interface is coupled to the implementation. To accomplish a task, you don't describe the task - you write the name of a program that executes that task. Once a program is named, no other program can be named that ever again. Imagine if programming languages worked that way.

I don’t understand the programming languages analogy, can you elaborate? One way to interpret that is “s/program/function, class or module/g“, but that sounds strange to me.

Re: Exa: An alternative to Ls

#79
post #73
post #70

alias ls='ls -vF' This way you'll see directories and executables in a glance. No need for colors, or fancy ls replacements.

Grouping/sorting also enhances human readability, and the options for this in GNU ls are quite limited.

Use sort(1), you can sort by fields.

Also, you have --group-directories-first in GNU ls.

Maybe everyone should read the man page before commenting.

Re: Exa: An alternative to Ls

#80
post #36

The main thing I use Exa for is as a better "tree": et() { exa -alT --git -I'.git|node_modules|.mypy_cache|.pytest_cache|.venv' --color=always "$@" | less -R; } alias et1='et -L1' alias et2='et -L2' alias et3='et -L3' Exa is great for this because it shows file details along with the tree hierarchy. (I have to manually specify a bunch of git-ignores because Exa's git ignore support doesn't work properly.)

Wanted to add:

I realized that my function above doesn't fully show how I use it. I recommend setting your $LESS to include -F so that by default it doesn't leave pages of output in your scrollback. That way you can get a quick tree, scrollable/searchable in your pager, and then don't lose your shell context. FWIW, my $LESS is:

    export LESS='-iMFx4 --mouse' # smart-case, status bar, quit 1 screen, 4sp tabs
Also should mention https://github.com/Canop/broot as a good directory explorer tool.
Post reply on HN