The exa
Linux command is larger than just a document lister; it’s a modern replace for the well-known ls
command, offering enhanced choices and a additional visually fascinating display. With its color-coded output and flexible possible choices, exa provides a whole view of your knowledge and directories.
While the usual ls
command has been a staple in Linux, exa
takes it a step further by the use of offering upper integration with other directions and kit. Whether or not or now not you’re a seasoned professional managing large servers or a hobbyist tinkering with a space setup, the exa
command is in most cases a precious addition to your toolkit. Used together with directions like grep
and in finding
, exa
allows for added atmosphere pleasant document taking a look and manipulation, streamlining your workflow and enhancing your command-line revel in.
How you can Arrange the exa
Command
exa
isn’t typically included by the use of default in most Linux distributions, in order that you’ll need to arrange it. Proper right here’s the way you’ll arrange exa
on some not unusual Linux distributions:
Ubuntu/Debian
You’ll be capable to arrange exa
from the package manager the use of the following directions:
sudo apt substitute sudo apt arrange exa
Fedora
On Fedora, you’ll use the following command:
sudo dnf arrange exa
Arch Linux
For those who’re the use of Arch Linux, you’ll arrange exa
from the AUR
:
yay -S exa
From Provide
If exa
isn’t available for your distribution’s package manager, or if you want the latest style, you’ll collect it from provide. You’ll need to have Rust installed to take a look at this:
git clone https://github.com/ogham/exa.git cd exa cargo assemble --release sudo cp function/release/exa /usr/local/bin/
Precompiled Binaries
You’ll be capable to moreover download precompiled binaries from the legitimate GitHub releases web page and place them for your PATH
.
After arrange, you’ll run exa from the command line very similar to you could with ls
or another command-line instrument.
How you can Use exa
1. Elementary Listing
Syntax: exa
Explanation: Lists knowledge and directories inside the provide record.
Example: exa
Output:
Forms Photos Films
Displays the names of three directories: Forms, Photos, and Films.
2. Long Structure
Syntax: exa -l
Explanation: Displays detailed information about knowledge and directories.
Example: exa -l
Output:
drwxr-xr-x individual group 4 KB Jul 1 10:00 Forms drwxr-xr-x individual group 4 KB Jul 1 10:00 Photos drwxr-xr-x individual group 4 KB Jul 1 10:00 Films
Presentations permissions, owner, group, size, modification date, and identify for three directories.
3. Tree View
Syntax: exa --tree
Explanation: Displays knowledge and directories in a tree-like building.
Example: exa --tree
Output:
. ├── Forms ├── Photos └── Films
Presentations the existing record and its 3 subdirectories in a tree building.
4. Type by the use of Size
Syntax: exa -S
Explanation: Sorts knowledge and directories by the use of size.
Example: exa -S
Output:
Films Photos Forms
Lists 3 directories sorted by the use of size.
5. Show Hidden Knowledge
Syntax: exa -a
Explanation: Lists all knowledge and directories, at the side of hidden ones.
Example: exa -a
Output:
.hidden Forms Photos Films
Displays 3 directories and one hidden document.
6. Display Git Status
Syntax: exa --git
Explanation: Presentations the Git status of knowledge and directories.
Example: exa --git
Output:
.M Forms ?? Photos .D Films
Displays 3 items with Git status: modified (M
) Forms, untracked (??
) Photos, and deleted (D
) Films.
7. Human-Readable Sizes
Syntax: exa -h
Explanation: Displays document sizes in a human-readable format.
Example: exa -h
Output:
Forms 4 KB Photos 10 MB Films 1 GB
Lists 3 directories with sizes in KB
, MB
, and GB
.
8. Record with Icons
Syntax: exa --icons
Explanation: Displays icons next to the tips.
Example: exa --icons
Output:
📠Forms 📠Photos 🎥 Films
Presentations 3 items with icons representing folders and flicks.
9. Color Scale for Sizes
Syntax: exa --colour-scale
Explanation: Displays document sizes with a color scale.
Example: exa --colour-scale
Output:
Forms (green) Photos (yellow) Films (purple)
Lists 3 directories with colors representing different size scales.
10. Filter by the use of Document Type
Syntax: exa --type=record
Explanation: Lists best directories.
Example: exa --type=record
Output:
Forms Photos Films
Presentations best the directories inside the provide location.
11. Staff Directories First
Syntax: exa --group-directories-first
Explanation: Lists directories first, followed by the use of knowledge.
Example: exa --group-directories-first
Output:
Forms Photos Films file1.txt file2.txt
Lists 3 directories followed by the use of two knowledge.
12. Limit Depth of Recursion
Syntax: exa --level=2 --tree
Explanation: Limits the depth of recursion in tree view to 2 levels.
Example: exa --level=2 --tree
Output:
. ├── Forms │ └── file1.txt ├── Photos └── Films
Presentations the existing record and its subdirectories and knowledge up to 2 levels deep.
Further Linux directions:
Record Operations | rmdir · cd · pwd · exa · ls |
Document Operations | cat · cp · dd · much less · contact · ln · rename · extra · head |
Document Device Operations | chown · mkfs · find |
Networking | ping · curl · wget · iptables · mtr |
Search and Text Processing | in finding · grep · sed · whatis · ripgrep · fd · tldr |
Device Knowledge and Regulate | env · historical past · most sensible · who · htop · glances · lsof |
Particular person and Session Regulate | display · su · sudo · open |
The post How one can Use the ‘exa’ Command in Linux appeared first on Hongkiat.
Supply: https://www.hongkiat.com/blog/linux-command-exa/
Contents
- 0.0.1 How you can Arrange the exa Command
- 0.0.2 How you can Use exa
- 0.0.2.1 1. Elementary Listing
- 0.0.2.2 2. Long Structure
- 0.0.2.3 3. Tree View
- 0.0.2.4 4. Type by the use of Size
- 0.0.2.5 5. Show Hidden Knowledge
- 0.0.2.6 6. Display Git Status
- 0.0.2.7 7. Human-Readable Sizes
- 0.0.2.8 8. Record with Icons
- 0.0.2.9 9. Color Scale for Sizes
- 0.0.2.10 10. Filter by the use of Document Type
- 0.0.2.11 11. Staff Directories First
- 0.0.2.12 12. Limit Depth of Recursion
- 0.0.2.13 Further Linux directions:
- 0.1 Related posts:
- 1 What are ISVs? [Examples, Benefits, and More]
- 2 24 Virtual Advertising Pointers That HubSpot Swears Through [Research]
- 3 How To Get Web Design Clients (10 Ways)
0 Comments