Utilities

Excellent Utilities: exa – replacement for ls

This is a series highlighting best-of-breed utilities. We cover a wide range of utilities including tools that boost your productivity, help you manage your workflow, and lots more besides. There’s a complete list of the tools in this series in the Summary section.

The Command Line Interface (CLI) is a way of interacting with your computer. To harness all the power of Linux, it’s highly recommended mastering the interface. It’s true the CLI is often perceived as a barrier for users migrating to Linux, particularly if they’re grown up using GUI software exclusively. While Linux rarely forces anyone to use the CLI, some tasks are better suited to this method of interaction, offering inducements like superior scripting opportunities, remote access, and being far more frugal with a computer’s resources.

starship and ripgrep are examples of free and open source software that are written in the Rust programming language. There’s lots of other useful Rust-based utility software. One that is particularly notable is exa. It’s a modern replacement for ls, a venerable command-line program that’s an integral part of any Linux distribution.

exa sports more features and arguably better defaults than ls. It uses colours to distinguish file types and metadata. The tool recognizes symlinks, extended attributes, and Git. It’s compact, fast, and a single binary.

Installation

There’s multiple ways to install the software. I’m only going to detail the steps I followed on my Arch distribution.

As I was installing the software on a fresh Arch installation, I installed Cargo, and then used Cargo to install exa. Cargo is the Rust package manager.

$ sudo pacman -S cargo
$ cargo install exa

You’ll need to ensure ~/.cargo/bin is in your PATH. The variable $PATH is set by your shell every time it launches, but you can set it so that it always includes your new path with every new shell you open. The exact way to do this depends on which shell you’re running.

I followed these steps for the bash shell:

  • Open the .bashrc file in my home directory (/home/sde/.bashrc) in a text editor.
  • Add export PATH=”~/.cargo/bin:$PATH” to the last line of the file.
  • Save the .bashrc file.
  • Restart my terminal (or run the command source .bashrc)

Next page: Page 2 – In Operation

Pages in this article:
Page 1 – Introduction / Installation
Page 2 – In Operation
Page 3 – Summary


Complete list of articles in this series:

Excellent Utilities
AbricotineMarkdown editor with inline preview functionality
AnanicyShell daemon created to manage processes’ IO and CPU priorities
brootNext gen tree explorer and customizable launcher
cheat.shCommunity driven unified cheat sheet
crocSecurely transfer files and folders from the command-line
DeskreenLive streaming your desktop to a web browser
dufDisk usage utility with more polished presentation than the classic df
exaA turbo-charged alternative to the venerable ls command
Extension ManagerBrowse, install and manage GNOME Shell Extensions
fdWonderful alternative to the venerable find
fkillKill processes quick and easy
fontpreviewQuickly search and preview fonts
horcruxFile splitter with encryption and redundancy
LanguageToolStyle and grammar checker for 30+ languages
Liquid PromptAdaptive prompt for Bash & Zsh
lnavAdvanced log file viewer for the small-scale; great for troubleshooting
lsdLike exa, lsd is a turbo-charged alternative to ls
McFlyNavigate through your bash shell history
mdlessFormatted and highlighted view of Markdown files
OCRmyPDFAdd OCR text layer to scanned PDFs
PaperworkDesigned to simplify the management of your paperwork
PDF Mix ToolPerform common editing operations on PDF files
pecoSimple interactive filtering tool that's remarkably useful
ripgrepRecursively search directories for a regex pattern
scrcpyDisplay and control Android devices
tldrSimplified and community-driven man pages
tmuxA terminal multiplexer that offers a massive boost to your workflow
TuskAn unofficial Evernote client with bags of potential
UlauncherSublime application launcher
WatsonTrack the time spent on projects
Whoogle SearchSelf-hosted and privacy-focused metasearch engine
Share this article

5 comments

  1. I cringe when I read about CLI utilities written in Rust. That exa binary is over 800KB! (see the exa debian amd64 package)

      1. And you should remember that “software bloat always expands to make use of all the memory available” ;+}

      2. It is not a discovery for me, but will be for some, as there are deliberate attempts to cover up how bloated rust-created binaries are. For example, the description here packages.debian.org/sid/exa: “and it is small, fast, and one single binary”. of course, “small” is relative. ‘ls’ is about 145KB. Does some colour-coding, extra columns and git compatibility justify the extra 600KB? I am old-school, probably these days the younger generation of programmers don’t care about the bloat, just the coding conveniences — I have to have a bit of a grumble about it though.

      3. You have to take into consideration that the average amount of disk space on any given computer is growing. In the grand scheme of things, on most computers that have a 200GB or so hard drive inside, a 600KB binary is incredibly small. It’s all relative. Of course, if you’re speaking in terms of an old laptop without much disk space, that’s probably not the best use case for exa anyway. Also, I don’t think anyone is denying that rust binaries are larger than normal. It’s a fact, considering that the entire rust standard library gets compiled in. One man’s bloat is another man’s minimalism.

Share your Thoughts

This site uses Akismet to reduce spam. Learn how your comment data is processed.