After my last article covering the ls command and its options, I was thinking about the shelf life of some commands and the improvements that you would have expected to see over the years. This kicked off a memory in my brain from All Things Open (ATO) 209 where IBM’s Chris Waldon hosted a talk on Terminal Velocity: Moving fast in your shell. If that title sounds familiar, it's because he wrote an article based on this talk. Anyway, during the ATO presentation, he featured a tool called exa that's a replacement for ls and I was pretty impressed with it. It turns out that some commands have been improved upon via well-executed, modern replacements. The exa utility is one of them.
So, what is exa?
exa, as I mentioned earlier, is an improvement on the classic ls command. At its heart, it serves to display listing information for all files and directories in your current working directory. It doesn’t sound all that exciting, does it? There is, however, more on offer here than you might initially think.
What improvements has exa made over ls?
The design approach around exa is simple. More is better. If you browse the webpage, you’ll find that the creator put a lot of thought into why ls was so spartan. It makes a lot of sense. In the 1960s, computers were exponentially more limited by processing time for the input of commands and the output of results. The original command line suite of commands was built with this I/O bottleneck in mind. With today’s advancements in computing technology, most of us have supercomputers in our pockets that can handle these tasks with ease. So, of course, modern servers and desktops can handle whatever we throw at them in most circumstances.
exa runs the stat system call on every single file it encounters. It then takes the information gleaned from this call and color codes it by permission type, owner, size, and more. One of the first things you’ll notice when using exa is how colorful things are. If you're one of those weird people who prefer the drab black and white of a traditional terminal output, you can opt-out of the color usage if you want. For everyone out there who uses git repositories for change management, exa also displays the git status of files when applicable. As of this writing, only two git changes are currently tracked:
N- new fileM- an existing file
Installation and Aliasing
If these features look appealing to you, I recommend that you install exa and give it a try. Exa is packaged for a number of distributions. On Fedora, install the rust-exa package with sudo dnf install exa. You can also install in on Red Hat Enterprise Linux (RHEL), albeit manually, and it works on macOS as well. For detailed installation instructions, be sure to check out the official exa webpage.
Once you have the program installed, you may want to alias it over your standard ls command. My alias looks something like this:
I encourage you to give it a try. You might enjoy the tool and, if nothing else, it might get you thinking of other improvements that we need as sysadmins.
Want to try out Red Hat Enterprise Linux? Download it now for free.
Sobre el autor
Tyler is the Sr. Community Manager at Enable Sysadmin, a submarine veteran, and an all-round tech enthusiast! He was first introduced to Red Hat in 2012 by way of a Red Hat Enterprise Linux-based combat system inside the USS Georgia Missile Control Center. Now that he has surfaced, he lives with his wife and son near Raleigh, where he worked as a data storage engineer before finding his way to the Red Hat team. He has written numerous technical documents, from military procedures to knowledgebase articles and even some training curricula. In his free time, he blends a passion for hiking, climbing, and bushcraft with video games and computer building. He is loves to read and enjoy a scotch or bourbon. Find him on Twitter or on LinkedIn.
Más como éste
Behind the scenes of RHEL 10, part 3
Alliander modernises its electricity grid with Red Hat for long-term reliability in balance with rapid innovation
OS Wars_part 1 | Command Line Heroes
OS Wars_part 2: Rise of Linux | Command Line Heroes
Navegar por canal
Automatización
Las últimas novedades en la automatización de la TI para los equipos, la tecnología y los entornos
Inteligencia artificial
Descubra las actualizaciones en las plataformas que permiten a los clientes ejecutar cargas de trabajo de inteligecia artificial en cualquier lugar
Nube híbrida abierta
Vea como construimos un futuro flexible con la nube híbrida
Seguridad
Vea las últimas novedades sobre cómo reducimos los riesgos en entornos y tecnologías
Edge computing
Conozca las actualizaciones en las plataformas que simplifican las operaciones en el edge
Infraestructura
Vea las últimas novedades sobre la plataforma Linux empresarial líder en el mundo
Aplicaciones
Conozca nuestras soluciones para abordar los desafíos más complejos de las aplicaciones
Virtualización
El futuro de la virtualización empresarial para tus cargas de trabajo locales o en la nube