To use exa

domingo, 23/06/2024 - 5 min
command exa

In the first post, I already showed what the command’s output looks like. It may or may not have colored output, with many options according to the user’s needs or preferences.

Another command for the same purpose is sometimes presented as an alternative to exa, sometimes as a substitute, which would be eza. I have it installed on my personal machine and in some other environments where I work, but since it requires installation, I opted for exa, which you can simply download and execute.

To make its use even simpler, I went a bit further and created a shortcut, or rather, a symbolic link, to a folder I created for this purpose. This folder, ~/.local/bin/, is already widely used for various scripts and applications, so I created the folder in the SDF environment and included it in the PATH variable to use it from any location without worrying about the executable’s location.

As a final improvement, I added some aliases to execute the command with my preferred options without having to remember them all or type a long command. These are to list the current directory (I use the options I also used with ls, the flags -lah), with the additional option to show icons for each entry according to its type.

With these configurations, executing the alias for the standard listing, equivalent to exa -lah --icons, the result would be like this:

tela do comando exa com opção  lista, todos e human

And when executing with the tree option and setting it to two levels of depth, equivalent to exa --tree --level=2 --icons, it would produce the following result:

tela do comando exa com opção tree