The exa Linux command is greater than only a report lister; it’s a contemporary substitute for the well known ls command, providing enhanced options and a extra visually interesting show. With its color-coded output and versatile choices, exa supplies a complete view of your information and directories.

Whilst the standard ls command has been a staple in Linux, exa takes it a step additional via providing higher integration with different instructions and equipment. Whether or not you’re a seasoned skilled managing huge servers or a hobbyist tinkering with a house setup, the exa command is usually a treasured addition in your toolkit. Used along side instructions like grep and in finding, exa permits for extra environment friendly report looking and manipulation, streamlining your workflow and embellishing your command-line enjoy.

How one can Set up the exa Command

exa isn’t in most cases incorporated via default in maximum Linux distributions, so that you’ll want to set up it. Right here’s how you’ll set up exa on some commonplace Linux distributions:

Ubuntu/Debian

You’ll be able to set up exa from the bundle supervisor the usage of the next instructions:

sudo apt replace
sudo apt set up exa

Fedora

On Fedora, you’ll use the next command:

sudo dnf set up exa

Arch Linux

In the event you’re the usage of Arch Linux, you’ll set up exa from the AUR:

yay -S exa

From Supply

If exa isn’t to be had on your distribution’s bundle supervisor, or if you need the newest model, you’ll assemble it from supply. You’ll want to have Rust put in to try this:

git clone https://github.com/ogham/exa.git
cd exa
shipment construct --release
sudo cp goal/launch/exa /usr/native/bin/

Precompiled Binaries

You’ll be able to additionally obtain precompiled binaries from the legitimate GitHub releases web page and position them on your PATH.

After set up, you’ll run exa from the command line similar to you might with ls or some other command-line software.

How one can Use exa

1. Fundamental List

Syntax: exa

Clarification: Lists information and directories within the present listing.

Instance: exa

Output:

Paperwork  Footage  Movies

Presentations the names of 3 directories: Paperwork, Footage, and Movies.

2. Lengthy Layout

Syntax: exa -l

Clarification: Presentations detailed details about information and directories.

Instance: exa -l

Output:

drwxr-xr-x  person  organization  4 KB  Jul  1 10:00  Paperwork
drwxr-xr-x  person  organization  4 KB  Jul  1 10:00  Footage
drwxr-xr-x  person  organization  4 KB  Jul  1 10:00  Movies

Displays permissions, proprietor, organization, measurement, amendment date, and title for 3 directories.

3. Tree View

Syntax: exa --tree

Clarification: Presentations information and directories in a tree-like construction.

Instance: exa --tree

Output:

.
├── Paperwork
├── Footage
└── Movies

Displays the present listing and its 3 subdirectories in a tree construction.

4. Kind via Measurement

Syntax: exa -S

Clarification: Types information and directories via measurement.

Instance: exa -S

Output:

Movies  Footage  Paperwork

Lists 3 directories looked after via measurement.

5. Display Hidden Information

Syntax: exa -a

Clarification: Lists all information and directories, together with hidden ones.

Instance: exa -a

Output:

.hidden  Paperwork  Footage  Movies

Presentations 3 directories and one hidden report.

6. Show Git Standing

Syntax: exa --git

Clarification: Displays the Git standing of information and directories.

Instance: exa --git

Output:

.M Paperwork  ?? Footage  .D Movies

Presentations 3 pieces with Git standing: changed (M) Paperwork, untracked (??) Footage, and deleted (D) Movies.

7. Human-Readable Sizes

Syntax: exa -h

Clarification: Presentations report sizes in a human-readable layout.

Instance: exa -h

Output:

Paperwork  4 KB  Footage  10 MB  Movies  1 GB

Lists 3 directories with sizes in KB, MB, and GB.

8. Listing with Icons

Syntax: exa --icons

Clarification: Presentations icons subsequent to the information.

Instance: exa --icons

Output:

📠Paperwork  📠Footage  🎥 Movies

Displays 3 pieces with icons representing folders and movies.

9. Colour Scale for Sizes

Syntax: exa --colour-scale

Clarification: Presentations report sizes with a colour scale.

Instance: exa --colour-scale

Output:

Paperwork (inexperienced)  Footage (yellow)  Movies (pink)

Lists 3 directories with colours representing other measurement scales.

10. Filter out via Record Kind

Syntax: exa --type=listing

Clarification: Lists handiest directories.

Instance: exa --type=listing

Output:

Paperwork  Footage  Movies

Displays handiest the directories within the present location.

11. Workforce Directories First

Syntax: exa --group-directories-first

Clarification: Lists directories first, adopted via information.

Instance: exa --group-directories-first

Output:

Paperwork  Footage  Movies  file1.txt  file2.txt

Lists 3 directories adopted via two information.

12. Prohibit Intensity of Recursion

Syntax: exa --level=2 --tree

Clarification: Limits the intensity of recursion in tree view to two ranges.

Instance: exa --level=2 --tree

Output:

.
├── Paperwork
│   └── file1.txt
├── Footage
└── Movies

Displays the present listing and its subdirectories and information as much as 2 ranges deep.

Extra Linux instructions:
Listing Operations rmdir · cd · pwd · exa · ls
Record Operations cat · cp · dd · much less · contact · ln · rename · extra · head
Record Gadget Operations chown · mkfs · find
Networking ping · curl · wget · iptables · mtr
Seek and Textual content Processing in finding · grep · sed · whatis · ripgrep · fd · tldr
Gadget Data and Control env · historical past · most sensible · who · htop · glances · lsof
Person and Consultation Control display · su · sudo · open

The publish How one can Use the ‘exa’ Command in Linux seemed first on Hongkiat.

WordPress Website Development Source: https://www.hongkiat.com/blog/linux-command-exa/

[ continue ]