Make your Linux file management easier - upgrade to exa tool
In Linux systems, file management is a very important operation, but the traditional ls command cannot meet the user's needs for file list display. At this time, a more powerful and easy-to-use tool is needed. Today, we will introduce a tool called exa, which can make your Linux file management simpler and more efficient.
exa command introduction
exa is a command line tool that can list directories and files in the specified path (if not specified, the current directory). This may sound familiar because that's what the ls command does.
exa is considered a modern replacement for the ancient ls command that has been around since the old days of UNIX. As claimed, it has more features and better default behavior than the ls command.

exa function
Here are some reasons why you should use exa instead of ls:
exa is as portable as ls (available on all major Linux distributions, *BSD and macOS)
Default color output
exa's differently formatted "verbose" output may appeal to Linux/BSD newbies
File queries are performed in parallel, which makes the performance of exa and ls comparable
Display the git staged or unstaged status of a single file
Another thing that makes exa different is that it is written in Rust. By the way, Rust has similar execution speed to C, but reduces memory errors at compile time so your software can execute quickly and safely.
Install exa on Linux system
exa has become popular recently as many distributions have started including it in their official software repositories. That said, you should be able to install it using your [distribution's package manager].
Starting with Ubuntu 20.10, you can use the apt command to install it:
sudo apt install exa
Arch Linux already has it, you just need to use the pacman command:
sudo pacman -S exa
Don't worry if it doesn't install through your package manager. After all it is a Rust package and you can easily install it with Cargo. Make sure you have Rust and Cargo installed on whatever distribution you are using or Ubuntu.
After installing Rust and Cargo, use this command to install exa:
cargo install exa
Use exa
exa has many command options, mainly for better formatted output and some improvements to improve comfort, such as the git staged or unstaged status of files, etc.
Below are some screenshots showing how exa works on your system.
Simply using the exa command will produce output similar to ls but with colors. This color thing might not be that appealing, since distributions like Ubuntu already provide colored ls output, at least in the desktop version. However, the ls command itself does not have colored output by default.

Screenshot of the output of the exa command without any additional flags
Please note that the options for the exa and ls commands are not the same. For example, while the -l option gives a long listing in both exa and ls, the -h option adds a column header instead of the human-readable option of ls.

As I mentioned before, exa has column headers for better "verbose" output
As I said before, exa already has built-in Git integration. The screenshot below gives a demonstration of the –git flag. Note that test_file shows -N in git's tracked column because it hasn't been added to the repository yet.

Demo how git flags work with exa
The examples below were not typed by my cat. It is a combination of options. exa has many options for you to try and explore.

A very colorful and detailed output with user-friendly verbose output
You can get the full list of options by running the following command in the terminal:
exa --help
However, if you want to understand what exa has to offer, you can check out the official documentation on its Git repository.
Is it worth switching from ls to exa?
For those new to UNIX-like operating systems, exa may be user-friendly, sacrificing ease of use in scripts for "ease of use" and appearance. Which shows more clearly is not a bad thing.
Anyway, ls is like a universal command. You can use exa for personal use, but when writing scripts, stick to ls. The difference in one [or more] flags between ls and exa can drive you crazy when the expected output does not match the actual output in either command.
I want to know what you think about exa. Have you tried it already? What was your experience with it?
Through the introduction of this article, we have learned about the basic usage of the exa tool and some common options and parameters. Compared with the traditional ls command, exa provides more rich information display and formatting options, making our file management easier and more efficient. If you are a Linux system administrator or developer, then please do not hesitate to upgrade to the exa tool quickly!
The above is the detailed content of Make your Linux file management easier - upgrade to exa tool. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



The key differences between CentOS and Ubuntu are: origin (CentOS originates from Red Hat, for enterprises; Ubuntu originates from Debian, for individuals), package management (CentOS uses yum, focusing on stability; Ubuntu uses apt, for high update frequency), support cycle (CentOS provides 10 years of support, Ubuntu provides 5 years of LTS support), community support (CentOS focuses on stability, Ubuntu provides a wide range of tutorials and documents), uses (CentOS is biased towards servers, Ubuntu is suitable for servers and desktops), other differences include installation simplicity (CentOS is thin)

How to use Docker Desktop? Docker Desktop is a tool for running Docker containers on local machines. The steps to use include: 1. Install Docker Desktop; 2. Start Docker Desktop; 3. Create Docker image (using Dockerfile); 4. Build Docker image (using docker build); 5. Run Docker container (using docker run).

Troubleshooting steps for failed Docker image build: Check Dockerfile syntax and dependency version. Check if the build context contains the required source code and dependencies. View the build log for error details. Use the --target option to build a hierarchical phase to identify failure points. Make sure to use the latest version of Docker engine. Build the image with --t [image-name]:debug mode to debug the problem. Check disk space and make sure it is sufficient. Disable SELinux to prevent interference with the build process. Ask community platforms for help, provide Dockerfiles and build log descriptions for more specific suggestions.

CentOS installation steps: Download the ISO image and burn bootable media; boot and select the installation source; select the language and keyboard layout; configure the network; partition the hard disk; set the system clock; create the root user; select the software package; start the installation; restart and boot from the hard disk after the installation is completed.

Docker process viewing method: 1. Docker CLI command: docker ps; 2. Systemd CLI command: systemctl status docker; 3. Docker Compose CLI command: docker-compose ps; 4. Process Explorer (Windows); 5. /proc directory (Linux).

Docker uses Linux kernel features to provide an efficient and isolated application running environment. Its working principle is as follows: 1. The mirror is used as a read-only template, which contains everything you need to run the application; 2. The Union File System (UnionFS) stacks multiple file systems, only storing the differences, saving space and speeding up; 3. The daemon manages the mirrors and containers, and the client uses them for interaction; 4. Namespaces and cgroups implement container isolation and resource limitations; 5. Multiple network modes support container interconnection. Only by understanding these core concepts can you better utilize Docker.

VS Code system requirements: Operating system: Windows 10 and above, macOS 10.12 and above, Linux distribution processor: minimum 1.6 GHz, recommended 2.0 GHz and above memory: minimum 512 MB, recommended 4 GB and above storage space: minimum 250 MB, recommended 1 GB and above other requirements: stable network connection, Xorg/Wayland (Linux)

VS Code To switch Chinese mode: Open the settings interface (Windows/Linux: Ctrl, macOS: Cmd,) Search for "Editor: Language" settings Select "Chinese" in the drop-down menu Save settings and restart VS Code
