exa is a modern replacement for the traditional “ls” command used to list the contents of a directory in Unix-like operating systems. It aims to provide an improved and more user-friendly alternative to the standard listing tool.
Here are some key points about exa:
- Enhanced features: exa offers additional features and enhancements compared to the basic functionality of “ls”. It provides a more informative and visually appealing output with enhanced metadata, color-coded file types, and improved readability.
- Intuitive and human-readable output: exa is designed to present directory contents in a clear and user-friendly manner. It displays file sizes in a human-readable format (e.g., “1.5K” instead of bytes), and the output is organized in columns for easy readability, especially when dealing with large directories.
- Color-coded output: exa uses color-coded highlighting to visually differentiate file types, making it easier to distinguish between directories, files, symbolic links, and other file types. This feature improves the visual representation and helps quickly identify different elements in the directory listing.
- Extended metadata: exa provides additional metadata information for files and directories, including file permissions, ownership, file size, modification date, and more. This enriched metadata allows users to gather more detailed information about the listed items without the need for additional commands or options.
- Tree-like view: exa offers a tree-like view option that displays directory contents in a hierarchical structure, providing a visual representation of nested directories and subdirectories. This view helps users understand the directory structure and relationships between files and directories at a glance.
- Support for Git: exa integrates with Git, a popular version control system, and provides special indicators to denote Git status information for files under version control. Users can quickly identify modified, staged, or untracked files within the directory listing, aiding in software development workflows.
- Customizable: exa offers customization options to adapt the output and behavior according to user preferences. Users can configure options such as color themes, sorting criteria, and file information displayed in the output to suit their specific needs.
- Cross-platform compatibility: exa is designed to work on various Unix-like systems, including Linux, macOS, and BSD operating systems. This makes it a versatile replacement for “ls” that can be used across different platforms.
By providing an enhanced and user-friendly directory listing experience, exa offers a modern alternative to the traditional “ls” command. With its intuitive output, color-coded highlighting, extended metadata, tree-like view, and Git integration, exa simplifies the process of navigating and understanding directory contents in a visually appealing and informative manner.
exa Command Examples
1. List files one per line:
# exa --oneline
2. List all files, including hidden files:
# exa --all
3. Long format list (permissions, ownership, size and modification date) of all files:
# exa --long --all
4. List files with the largest at the top:
# exa --reverse --sort=size
5. Display a tree of files, three levels deep:
# exa --long --tree --level=3
6. List files sorted by modification date (oldest first):
# exa --long --sort=modified
7. List files with their headers, icons, and Git statuses:
# exa --long --header --icons --git
8. Don’t list files mentioned in .gitignore:
# exa --git-ignore