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.
Sull'autore
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.
Altri risultati simili a questo
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
The Overlooked Operating System | Compiler: Stack/Unstuck
Linux, Shadowman, And Open Source Spirit | Compiler
Ricerca per canale
Automazione
Novità sull'automazione IT di tecnologie, team e ambienti
Intelligenza artificiale
Aggiornamenti sulle piattaforme che consentono alle aziende di eseguire carichi di lavoro IA ovunque
Hybrid cloud open source
Scopri come affrontare il futuro in modo più agile grazie al cloud ibrido
Sicurezza
Le ultime novità sulle nostre soluzioni per ridurre i rischi nelle tecnologie e negli ambienti
Edge computing
Aggiornamenti sulle piattaforme che semplificano l'operatività edge
Infrastruttura
Le ultime novità sulla piattaforma Linux aziendale leader a livello mondiale
Applicazioni
Approfondimenti sulle nostre soluzioni alle sfide applicative più difficili
Virtualizzazione
Il futuro della virtualizzazione negli ambienti aziendali per i carichi di lavoro on premise o nel cloud