linuxkernel.com

eza cheat sheet

replaces ls

List files with git status, icons, and a built-in tree view.

Covers eza v0.23.4 [+git]. Click any command for details & copy · press / to search.

Basic Display

ezaList current directory as a grid (default)
eza -1One entry per line (oneline view)
eza -GExplicit grid view (default; useful to override an alias)
eza -xGrid sorted across columns instead of down
eza -lLong view: permissions, size, date, owner in a table
eza -lhLong view with a header row above each column
eza --icons=alwaysShow Nerd Font icons beside every file name
eza --icons=autoShow icons only when output is a real terminal (auto-detect)
eza -FAppend type indicators: / dirs, * executables, @ symlinks
eza --hyperlinkRender file names as OSC-8 terminal hyperlinks (clickable in supported terminals)
eza --color=alwaysForce ANSI colors even when output is piped
eza --color-scale=sizeUse a gradient color to visually rank file sizes
eza --color-scale=ageUse a gradient color to visually rank file ages
eza --color-scale-mode=gradientSmooth gradient for color-scale (default; alternative: fixed)
eza -w 100Force grid to use 100 columns wide
eza --absolute=onPrint full absolute path for every entry
eza --absolute=followPrint absolute path and resolve symlinks to their targets
eza --no-quotesDo not add quotes around file names that contain spaces

Long View: Metadata Columns

eza -l -gLong view + show group column (omitted by default)
eza -l --smart-groupShow group only when it differs from the owner
eza -l -HAdd hard link count column
eza -l -iAdd inode number column
eza -l -nShow numeric UID/GID instead of names
eza -l -bShow sizes with binary prefixes (KiB, MiB, GiB)
eza -l -BShow raw byte counts, no prefix at all
eza -l -SShow allocated filesystem block size instead of logical size
eza -l --total-sizeShow recursive total size for directories (Unix only)
eza -l -oShow permissions as octal (e.g. 755) instead of rwxrwxrwx
eza -l --no-permissionsHide the permissions column
eza -l --no-filesizeHide the file size column
eza -l --no-userHide the user/owner column
eza -l --no-timeHide the timestamp column
eza -l -OShow macOS/BSD file flags or Windows attributes column
eza -l -@List each file's extended attributes (xattr) and their sizes
eza -l -ZList each file's SELinux / security context
eza -l -MShow mount point details (Linux and macOS only)
eza -l -XDereference symlinks: show target metadata instead of link metadata

Timestamps

eza -l -mUse modified time (default timestamp field)
eza -l -uUse accessed time
eza -l -UUse created time
eza -l --changedUse changed (ctime) timestamp
eza -l -t modifiedExplicitly select which time field to show via --time flag
eza -l --time-style=relativeShow human-relative times ("3 days ago")
eza -l --time-style=isoISO-8601 short format (2024-05-01)
eza -l --time-style=long-isoISO-8601 with time (2024-05-01 14:30)
eza -l --time-style=full-isoFull ISO-8601 with nanoseconds and timezone offset
eza -l --time-style='+%Y-%m-%d %H:%M'Custom strftime-style timestamp format

Tree View

eza -TRecurse into directories as a tree (like the tree command)
eza -T -L 2Tree view limited to 2 levels deep
eza -lTTree view with full long-view metadata on every entry
eza -lT -L 3Long tree view, 3 levels deep
eza -T --group-directories-firstTree view with directories listed before files at each level
eza -T --git-ignoreTree view that omits files listed in .gitignore
eza -T -I 'node_modules|.git'Tree view ignoring node_modules and .git directories
eza -T --follow-symlinksDescend into symlinked directories as if they were real dirs

Git Integration

eza -l --gitAdd a two-character Git status column per file (staged + unstaged)
eza -l --git --git-ignoreLong view with Git status, hiding .gitignore'd files
eza -l --git-reposFor each directory, show its Git repo root status (|= clean, += dirty)
eza -l --git-repos-no-statusMark Git repos without computing status (much faster on large repos)
eza -l --no-gitExplicitly suppress Git status even if --git is in an alias
eza --git-ignoreFilter out files that are ignored by Git (no long view required)

Filtering

eza -aShow hidden dot-files
eza -aaShow hidden files AND the . and .. entries
eza -AAlmost-all: hidden files but not . and .. (ls -A compatible)
eza -DList only directories
eza -fList only files (no directories)
eza -D --show-symlinksList only dirs but also include symlinks (use with -D or -f)
eza --no-symlinksHide symbolic links from the listing
eza -dTreat directory arguments as files (show metadata about the dir, not its contents)
eza -I 'pattern1|pattern2'Ignore files matching any of these pipe-separated glob patterns
eza --git-ignoreRespect .gitignore — omit any file the repo ignores
eza -RRecurse into all subdirectories (flat listing)
eza -R -L 2Recurse up to 2 levels deep

Sorting

eza -s nameSort by name, case-insensitive mix (a, A, b, B...)
eza -s NameSort by name, uppercase before lowercase (A, B... a, b...)
eza -s extensionSort by file extension
eza -s sizeSort by file size, smallest first
eza -s modifiedSort by modification time, oldest first (aliases: date, time, old)
eza -s newSort by modification time, newest first (alias for reverse-modified)
eza -s accessedSort by last-accessed time
eza -s createdSort by creation time
eza -s typeSort by file type (directories, files, symlinks grouped)
eza -s inodeSort by inode number
eza -s noneNo sorting; preserve filesystem order
eza -r -s sizeReverse sort order: largest files first when sorting by size
eza --group-directories-firstAlways list directories before files, regardless of sort field
eza --group-directories-lastAlways list directories after files

Stdin and Scripting

eza --stdinRead file/directory paths from stdin, one per line
eza --color=always | less -RPipe with forced color preserved for less
EZA_STRICT=1 eza ...Enable strict mode: error on conflicting options instead of last-wins

Environment Variables & Configuration

EZA_COLORS='*.rs=36:da=32'Override file and metadata colors using LS_COLORS-style key=ANSI pairs, colon-separated
LS_COLORS='di=1;34'Standard LS_COLORS variable; eza reads it as a fallback when EZA_COLORS is unset
EZA_ICONS_AUTO=1Auto-enable icons globally without passing --icons every time
EZA_ICON_SPACING=2Set number of spaces between icon and filename (tune for your terminal font)
EZA_GRID_ROWS=10Only use grid+long (eza -lG) when at least N rows of output would be shown
EZA_MIN_LUMINANCE=50Set minimum brightness for color-scale gradient (-100 to 100)
EZA_STDIN_SEPARATOR=':'Use a custom separator when reading paths from stdin
EZA_OVERRIDE_GIT=1Override any --git or --git-repos argument
NO_COLOR=1Disable all color output (standard NO_COLOR convention; overridable with --color=always)
COLUMNS=120Override terminal width for grid layout (--width takes precedence)

Killer recipes

Long view with Git status, icons, header, dirs first

eza -lah --icons=always --git --group-directories-first --time-style=relative

The definitive ls alias for a developer: permissions, sizes (human), relative timestamps, Git status per file, Nerd Font icons, hidden files included, directories on top. Drop into your shell aliases as `ll`.

Interactive file picker piped to bat via fzf

eza -1 --icons=always --color=always | fzf --ansi --preview 'bat --color=always --style=numbers {}'

Browse the current directory with icons and colors in fzf, with a live syntax-highlighted preview of each file via bat. Press Enter to select.

Large-file hunt: sorted by size, largest first

eza -lah -s size -r --total-size --color-scale=size

Recursively-aware size view sorted largest-first, with gradient color scaling to immediately spot the biggest files. Add -R to go recursive across all subdirs.

Project tree respecting .gitignore, limited depth

eza -lT -L 3 --git-ignore --group-directories-first --icons=always

Print a clean project tree 3 levels deep, automatically omitting everything your .gitignore excludes, with dirs first and icons for quick scanning.

Recently modified files, newest on top

eza -lah -s new --time-style=long-iso

Sort all files (including hidden) by modification time, newest first, with ISO timestamps — fast way to find what changed recently in a directory.

Combine fd + eza for filtered long listing

fd --type f --extension py | eza --stdin -lah --git --icons=always

Use fd to find all Python files recursively, then pipe into eza via --stdin for a rich long-view listing with Git status on exactly those files.

Notes & tips

exa is dead — use eza exa was abandoned in 2022; eza is the maintained community fork hosted at github.com/eza-community/eza. Installed as eza, not exa. As of v0.23.4 it ships with git support compiled in ([+git] shown in --version).
Shell alias setup (recommended)
alias ls='eza --icons=auto --group-directories-first'
alias ll='eza -lah --icons=auto --git --group-directories-first --time-style=relative'
alias lt='eza -lT --icons=auto --git-ignore -L 3'
alias la='eza -lah --icons=auto'

Add EZA_ICONS_AUTO=1 to your shell profile to enable icons globally.
Icons require a Nerd Font --icons renders blank boxes or question marks in terminals not configured with a Nerd Font (e.g. FiraCode Nerd Font, Hack Nerd Font). Install one and set it as your terminal's font.
Git columns explained --git adds two characters per file — first is staged status, second is unstaged. Codes: - not modified, M modified, N new, D deleted, R renamed, T type-change, I ignored, U conflicted.
--git-repos vs --git --git shows per-file status inside a directory; --git-repos shows the status of directories that are git repos (useful when listing a parent folder of many projects). --git-repos-no-status is much faster and just marks which dirs are repos without computing diff status.
Color customization EZA_COLORS uses the same key=ANSI format as LS_COLORS (colon-separated). Two-letter codes cover metadata (permissions: ur/uw/ux, git: ga/gm/gd, etc.); file globs like *.rs=36 color by extension. Prepend reset: to disable all built-in defaults.
EXA_ prefix backward compat If EZA_* env vars are not set, eza falls back to reading EXA_* equivalents for compatibility with old exa configs.
--total-size is recursive but slow It must stat every file in a directory tree; avoid on very large directories or network mounts.
Piping strips auto-detection --icons=auto and --color=auto both detect a TTY and turn off when piped. Use =always variants when piping to tools like fzf or less that can handle ANSI (e.g. --color=always | less -R).