Live data from Hacker News

Exa, a modern replacement for ls

the.exa.website

21–30 of 420 posts

Re: Exa, a modern replacement for ls

#21
post #5

Earlier quoted context omitted.

From the FAQ: >Is this a drop-in replacement for ls? No — exa has, in my opinion, much saner defaults than ls, so while the available command-line options are similar, they are not exactly the same. Most of the common options will work consistently, though. For example, exa prints human-readable file sizes by default (when would you not want that?) so ls -h no longer applies.

"exa prints human-readable file sizes by default (when would you not want that?)" When doing automated text-processing and wanting to easily do precise calculations, without having to deal with different units.

The important part is by default. exa can provide bytes sizes, it just provides human-readable ones by default.

Re: Exa, a modern replacement for ls

#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" (Ubuntu 17.04)

Re: Exa, a modern replacement for ls

#23
post #5

Earlier quoted context omitted.

From the FAQ: >Is this a drop-in replacement for ls? No — exa has, in my opinion, much saner defaults than ls, so while the available command-line options are similar, they are not exactly the same. Most of the common options will work consistently, though. For example, exa prints human-readable file sizes by default (when would you not want that?) so ls -h no longer applies.

"exa prints human-readable file sizes by default (when would you not want that?)" When doing automated text-processing and wanting to easily do precise calculations, without having to deal with different units.

How does the number of bytes help with text processing? Are all your files in fixed-length encodings?

Re: Exa, a modern replacement for ls

#26

so... a mix up of the following: which ls alias ls='ls --color=auto' /bin/ls tree -L 2 git diff --stat git status

But this is "Modern". The problem I see with these "modern" command replacements is 1) muscle memory and 2) I have to log into some old systems that simply will not have anything this "modern".

Sure, but it's easy enough to fall back after you get the command error.

If you want, you can alias it to `ls` so you don't lose muscle memory.

Re: Exa, a modern replacement for ls

#27
post #5

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?

From the FAQ: >Is this a drop-in replacement for ls? No — exa has, in my opinion, much saner defaults than ls, so while the available command-line options are similar, they are not exactly the same. Most of the common options will work consistently, though. For example, exa prints human-readable file sizes by default (when would you not want that?) so ls -h no longer applies.

But a length in bytes is even better than human-readable: it's a graph (technically a histogram), so it can be scanned, which is even faster than reading. It's far faster to identify the smallest or largest file in a directory with standard ls. There are some times when I do want human readable, but then I typically want to specify the units, so I see everything in megabytes.

Re: Exa, a modern replacement for ls

#28
post #5

Earlier quoted context omitted.

From the FAQ: >Is this a drop-in replacement for ls? No — exa has, in my opinion, much saner defaults than ls, so while the available command-line options are similar, they are not exactly the same. Most of the common options will work consistently, though. For example, exa prints human-readable file sizes by default (when would you not want that?) so ls -h no longer applies.

> > For example, exa prints human-readable file sizes by default (when would you not want that?) When its being used as part of a script.

Parsing ls is a pain anyway, using "stat --printf=%s" is much better in scripts, in my opinion.

Re: Exa, a modern replacement for ls

#29

so... a mix up of the following: which ls alias ls='ls --color=auto' /bin/ls tree -L 2 git diff --stat git status

But this is "Modern". The problem I see with these "modern" command replacements is 1) muscle memory and 2) I have to log into some old systems that simply will not have anything this "modern".

An alias in your favorite shell's .rc file solves the first problem. Better yet, you can throw it behind a test block to ensure you never get a command not found error:

    test -f /usr/bin/exa && alias ls='/usr/bin/exa'
The second problem is solved by configuration management tools pushing out your desired tools to your entire environment.

Re: Exa, a modern replacement for ls

#30
post #19

exa is hard to type, bad choice of name for something I'd be typing many times a day

I thought the same at first. ls is good mnemonic for list, but what exa stands for and why three letters?

"gf" for example would be better. neighbor characters on the keyboard, could stand for get files.

Post reply on HN