--- title: eza โ€” modern ls date: 2026-10-18 time: 12:00 model: admin category: programs author_type: human summary: A Rust-based command that replaces the old ls. It shows colors, icons, git status, and tree structure all in one screen. tags: program, Modern CLI Tools, eza --- **๐Ÿ’ฌ "The eza Command"** eza is a **Rust-based command that modernizes the classic ls**. It displays colors, icons, git status, and tree structure all in one view. By using the standard ls options while providing more information, it significantly reduces the need for server file exploration. - **Concept**: Outputs directory listings in a visually rich format. - **Default ls Replacement**: Displays the same list as `ls -l` but in a more readable format. - **--long**: Shows detailed permissions, owner, size, and date. - **--tree**: Expands subdirectories into a tree structure. ## Installation and Download eza can be installed via a package manager or Rust cargo. Servers (Debian/Ubuntu) use apt, while development machines can use cargo or brew. | Environment | Command | | --- | --- | | Ubuntu / Debian | sudo apt install eza | | Fedora / RHEL | sudo dnf install eza | | Arch | sudo pacman -S eza | | macOS (brew) | brew install eza | | Rust cargo | cargo install eza | | Binary Download | github.com/eza-community/eza/releases | Verify the installation with `eza --version`. For older distribution versions, the package may not be available, so use cargo or release binaries. ## Frequently Used Options | Option | Description | | --- | --- | | -l | Displays a detailed listing (permissions, owner, size) | | -a | Shows hidden files as well | | --tree | Outputs the substructure in a tree format | | --git | Shows the git change status of files | | --sort=modified | Sorts by last modified date | ## 3 Essential Command Combinations - `eza -l` โ€” View permissions, size, and date details at a glance. - `eza --tree --level=2` โ€” Visualize the folder structure as a tree up to 2 levels deep. - `eza -l --sort=modified | head` โ€” List recently modified files first in detail. **๐Ÿ’ฌ "Show me an example of checking a directory on a real server."** Here is a step-by-step breakdown of a common scenario encountered on a live server. ### Step 1 ยท Verify Installation First, check if it is installed, and if not, install it. ``` eza --version || sudo apt install -y eza ``` ### Step 2 ยท Inspect Web Root in Detail View permissions and owner together. ``` eza -l /var/www/html ``` ### Step 3 ยท Understand Folder Structure Check the tree structure up to 2 levels deep. ``` eza --tree --level=2 /var/www/html ``` ## Actual Execution Output This is the result of listing the web root in detail using eza after installation. Permissions, owner, and size are displayed with colors. ![eza command execution result: detailed web root listing after installation](https://games.aidebatehub.com/assets/eza-demo.png) Live production server ## In Practice, It's Used Like This ### 1. Finding Recently Modified Files **Situation** โ€” Locating a deployment file that was just uploaded. ``` eza -l --sort=modified /var/www/html | head -5 ``` **Result** โ€” Files with the most recent modification dates appear at the top. **Key Point** โ€” Sorting by time is easily done with sort=modified. ### 2. Getting an Overview of a Project Structure **Situation** โ€” Understanding the folder structure of a project you're opening for the first time. ``` eza --tree --level=2 --git ``` **Result** โ€” The tree structure and git-modified files are displayed together. **Key Point** โ€” Limiting the depth with level prevents the output from overflowing. ## Actual Execution Output This is the result of viewing files sorted by most recently modified. ![eza command execution result: sorting by recently modified files](https://games.aidebatehub.com/assets/eza-demo2.png) Live production server ## Points to Note - eza requires separate installation (via apt, brew, cargo, etc.). - Older distribution versions may not have the apt package, so use cargo or a binary. - If an existing `ls` alias remains, eza might execute first, so be cautious. - When --tree is expanded deeply, the output can be long, so use it with `head`. - When replacing `ls` with `eza` in scripts, check for option compatibility. --- Source (HTML): https://games.aidebatehub.com/programs/linux/modern/eza.html This file is an auto-generated Markdown twin of the DevHub document.