Live data from Hacker News

Exa, a modern replacement for ls

the.exa.website

81–90 of 420 posts

Re: Exa, a modern replacement for ls

#81
post #37

Earlier quoted context omitted.

> I almost never use the human-readable file sizes. Same here. I love the idea, and i keep trying to use human-readable sizes in every command which supports them. But it turns out they're much less scannable than numbers in a common unit. How long does it take you to see which of these files is biggest: 13k potatoes.txt 7M tomatoes.txt 128 recipe_ideas.txt 1G hot_sauce_formula.txt How about now: 13093 potatoes.txt 7…

Interesting point. Maybe we could have our cake and eat it too: .. 13k potatoes.txt .... 7M tomatoes.txt 128 recipe_ideas.txt ........ 1G hot_sauce_formula.txt

That's a clever hack, I like it

Re: Exa, a modern replacement for ls

#82
post #68

> For example, exa prints human-readable file sizes by default (when would you not want that?) When I've got two similar but non-identical files, and I think that the difference between their sizes might be important. That's a silly nitpick, though. It's not like I lose ls by installing exa. Plus, it's a nice excuse to see if I can get cargo working around the corporate firewall.

I agree. Relativity is important - uniform units.

You would never say that you are 0.0018 kilometers tall. Using sane unit sizes is important. If two files are orders of magnitude different in size, it's easy to tell that just by the units. As opposing to counting the number of digits, which is tedious and error prone.

If they are similar, then it's easy enough to tell that also. E.g. 1 GB vs 995 MB.

Re: Exa, a modern replacement for ls

#83

While it's not the intention to replace the binary itself, I'm just not a fan of the idea of substituting system built-ins in everyday behavior. Stuff like cd, ls, etc. I like to keep it to the basics. Even just with PATHs or aliases, or a new binary entirely. And I'm a person who is no stranger to dot-configs. I've never taken it as far as Z(1), https://github.com/rupa/z . A system builtin is stuff you'd see stowed…

It's not overriding anything, so you're ranting against a faulty premise. The command is called "exa", not "ls", and it isn't even a drop-in replacement -- it doesn't have the same flags. You can't alias "ls" to it.

Re: Exa, a modern replacement for ls

#84
post #22

The main problem I can think of is that I'm so used to type cd and then ls... But OTOH it's as simple to fix as alias ls=exa EDIT: "exa prints human-readable file sizes by default (when would you not want that?)" I actually use bytes a lot for certain progress calculations. Also I get an error "exa: error while loading shared libraries: libhttp_parser.so.2.1: cannot open shared object file: No such file or directory"…

> The main problem I can think of is that I'm so used to type cd and then ls... But OTOH it's as simple to fix as alias ls=exa Are you really sure you want to replace ls with exa? I can think of a dozen reasons it could cause trouble.

It will definitely be easier to check it out this way.

Re: Exa, a modern replacement for ls

#86

Earlier quoted context omitted.

Why does a directory lister need an HTTP parser?

I am wondering that too, but FWIW `sudo apt-get install libhttp-parser2.1` will have you on your way.

Thanks, but I wanted to report it nevertheless because it says the file is self contained.

Re: Exa, a modern replacement for ls

#88
post #77
post #69

Earlier quoted context omitted.

After strip it is 1.1M.

For comparison, ls is 38k on macOS (edit: and coreutils’ ls is 138k).

Interesting; du reports on mine at 20k.

    % du -h /bin/ls
     20K	/bin/ls

Although as you mention...

    % ls -laF /bin/ls
    -rwxr-xr-x  1 root  wheel  38624 Jul 15 00:29 /bin/ls*

Re: Exa, a modern replacement for ls

#89
post #37

Earlier quoted context omitted.

I almost never use the human-readable file sizes. For this to get any traction it is going to need to accept every argument ls does and play nicely. Most people who work with nix systems work on many systems and some of them don't control the software loaded on them. If I have to remember that on this* system I have to use these arguments because I have exa, vs this system I have normal ls that is going to be a deal…

> I almost never use the human-readable file sizes. Same here. I love the idea, and i keep trying to use human-readable sizes in every command which supports them. But it turns out they're much less scannable than numbers in a common unit. How long does it take you to see which of these files is biggest: 13k potatoes.txt 7M tomatoes.txt 128 recipe_ideas.txt 1G hot_sauce_formula.txt How about now: 13093 potatoes.txt 7…

>unless you have some fancypants sort which understands them

FWIW GNU sort can sort by human readable units using the -h option.

Re: Exa, a modern replacement for ls

#90
post #68

Earlier quoted context omitted.

I agree. Relativity is important - uniform units.

You would never say that you are 0.0018 kilometers tall. Using sane unit sizes is important. If two files are orders of magnitude different in size, it's easy to tell that just by the units. As opposing to counting the number of digits, which is tedious and error prone. If they are similar, then it's easy enough to tell that also. E.g. 1 GB vs 995 MB.

Indeed, but you are speaking of relativity on a smaller scale. The problem is, at a glance, seeing 990KB flash by next to 1MB, you will mentally categorize them very differently.

I would prefer to choose the base unit and see the decimals myself. Then I can quickly ascertain the difference.

Post reply on HN