Why I use exa instead of ls on Linux | Opensource.com

Why I use exa instead of ls on Linux

Exa is a modern-day replacement for the Linux ls command.

bash logo on green background
Image by : 
Opensource.com
x

Subscribe now

Get the highlights in your inbox every week.

We live in a busy world and can save time and effort by using the ls command when we need to look for files and data. But without a lot of tweaking, the default ls output isn't quite soothing to the eyes. Why spend your time squinting at black and white text when you have an alternative in exa?

Exa is a modern-day replacement for the regular ls command, and it makes life easier. The tool is written in Rust, which is known for its parallelism and safety.

Install exa

To install exa, run:

$ dnf install exa

Explore exa's features

Exa improves upon the ls file list with more features and better defaults. It uses colors to distinguish file types and metadata. It knows about symlinks, extended attributes, and Git. And it's small, fast, and has just a single binary.

Track files

You can use exa to track a new file added in a given Git repo.

Tree structure

This is exa's basic tree structure. The level determines the depth of the listing; this is set to two. If you want to list more subdirectories and files, increase the level's value.

This tree includes a lot of metadata about each file.

exa_metadata.png

Metadata in exa's tree structure

(Sudeshna Sur, CC BY-SA 4.0)

Color schemes

By default, exa segregates different file types according to built-in color schemes. It not only color-codes files and directories, but also Cargo.toml, CMakeLists.txt, Gruntfile.coffee, Gruntfile.js, Makefile, and many other file types.

Extended file attributes

When you're exploring xattrs (extended file attributes) in exa, --extended will show up in all the xattrs.

exa_xattrs.png

xattrs in exa

(Sudeshna Sur, CC BY-SA 4.0)

Exa understands symlinks and also points out the actual file.

exa_symlinks.png

symlinks in exa

(Sudeshna Sur, CC BY-SA 4.0)

Recurse

When you want to loop listings for all directories under the current directory, exa brings in recurse.

exa_recurse.png

recurse in exa

(Sudeshna Sur, CC BY-SA 4.0)

Conclusion

I believe exa is one of the easiest, most adaptable tools. It helps me track a lot of Git and Maven files. Its color-coding makes it easier for me to search through multiple subdirectories, and it helps me to understand the current xattrs.

Have you replaced ls with exa? Please share your feedback in the comments.

Hand putting a Linux file folder into a drawer

Linux's ls command has a staggering number of options that can provide important information about your files.
People work on a computer server with devices

If your application isn't working—or you're just looking for more information—these 20 commands will come in handy.

Topics

About the author

Sudeshna is from Kolkata and currently working for the Red Hat Middleware team in Pune, India. She loves to explore different open source projects and programs. She started contributing to Open Source a couple of years back as an Hacktober Participant since then she has been an avid blogger at Dzone on Python and Data Science. She enjoys her free time stargazing and loves continental cuisine. She is an RHCSA and is working her way to RHCA.
Sudeshna Sur - Sudeshna is from Kolkata and currently working for the Red Hat Middleware team in Pune, India. She loves to explore different open source projects and programs. She started contributing to Open Source a couple of years back as an Hacktober Participant since then she has been an avid blogger at Dzone on Python and Data Science. She enjoys her free time stargazing and loves continental cuisine. She is an RHCSA and is working her way to RHCA.