exa is a tiny, fast, and modern replacement for the ordinary ls command that comes pre-installed on all Unix and Linux operating systems. It is an enhanced file lister that ships with more advanced features and a more user-friendly version of ls.
It uses colors to determine the information of file types and metadata. It is also aware of symlinks, extended attributes, viewing git status, and recursing into directories with a tree view.
The command exa is used by command-line users, system administrators, and programmers hundreds of times daily, as well as being helpful when writing automated scripts.
Installing exa on Linux Systems
exa is a self-contained binary package, which is available for many modern Linux distributions and can be installed using common package managers.
$ sudo apt install exa [On Ubuntu & Debian] $ sudo dnf install exa [On Fedora, CentOS & RHEL] $ sudo zypper install exa [On openSUSE] $ sudo emerge sys-apps/exa [On Gentoo] $ sudo pacman -S exa [On Arch & Manjaro]
If you are using an earlier version of Linux distribution, you will have to use the manual installation procedure.
Using exa on Linux Systems
As mentioned earlier, exa is an improvement version of the classic ls command and can be executed by specifying your options, and input file names, then exa queries the filesystem and displays the names and information of metadata about the files it comes across.
$ exa [OPTIONS] [FILES]
exa doesn’t bother whether files or options come first in the list, though it’s common practice to put the options before the files.
Listing Files
Listing files is a cakewalk, you just need to mention the filename with an argument with some options for how to print files, and exa will list them.
$ exe $ exa -l $ exa -l Linux_For_Beginners.pdf
Listing Directories
If you specify a directory name to exa, it will list the contents of that directory rather than listing the directory itself.
$ exa Documents
Listing Links
A link is a file that points to another file as its “actual” contents in Linux. When you run exa, it will print a link’s target path next to its filename as shown.
$ exa -l /etc/localtime /etc/resolv.conf
Recursive Listing
Finally, it’s achievable for exa to recurse into a directory and display the contents of every sub-directory underneath it.
$ exa -l --recurse /home
For a complete reference on what exa can do, visit the documentation pages here.
I’ll have to try out exa to see if it’s really worth the time versus the standard ls command. With that said, all the extra “features” are starting to make me wonder if this is breaking too much with the traditional “one tool, one purpose” model of *nix.
A very good article, I didn’t know about this tool before. I will surely install and try this tool on my new Ubuntu 20.04 machine.
Thanks
@Anusha,
I am glad, that you liked this article, feel free to try and if you get any errors do ask me here…
Thanks for the reply…
Yes, I will try and see, if any issues arise will surely ask for help…
Thanks
The error seems to have been created by the comment administration software. The sixth last line should have been:
ls filename (with angle braces around ‘filename’)
Instead, it came out as just:
There is an error in the 6th last non-blank line above. I have corrected it below:)
For me, a useful improvement on ls would:
--time-style=TIME_STYLE
parameter.exa accomplishes only the third in a very clumsy way with its boolean parameters
--no-permissions
,--no-filesize
,--no-user
, and--no-time
parameters, but it doesn’t accomplish 1, 2 and 4.My workaround, which accomplishes, for me, 1, 3 and 4 is the bash script:
The first branch is the logical equivalent of:
The second branch is the logical equivalent of just:
An example of my script’s use is:
For me, a useful improvement on ls command would:
--time-style=TIME_STYLE
parameter.exa accomplishes only the third in a very clumsy way with its boolean parameters
--no-permissions
,--no-filesize
,--no-user
and--no-time parameters
, but it doesn’t accomplish 1, 2 and 4My workaround, which accomplishes, for me, 1, 3 and 4 is the bash script:
The first branch is the logical equivalent of:
The second branch is the logical equivalent of just:
An example of my script’s use is:
It doesn’t seem to be able to do anything that ls can’t, either on its own or by means of simple combinations with other Unix tools.
@Jay,
No doubt that ls command does everything, but exa has some better features which are not present in ls, such as showing git status, colours to distinguish file types and metadata, built-in tree tool to list files in hierarchy pattern and many more. Also, exa is faster than ls, as it queries files in parallel.
Man exa and I have 80% of the article but still miss the answer to the biggest question: Why for God’s sake?
Ivan,
It’s due to its fast execution as compared to the standard ls command, as it queries files in parallel, which makes exa faster and improves the performance of results. Also, it has some nicer features which are not present in ls such as viewing git status, colors to distinguish file types and metadata, a built-in tree tool to view files in hierarchy fashion and many more.