eza(1)

eza(1) β€” General Commands Manual πŸ’–

okay bestie, buckle up, because this is the eza page from the General Commands Manual and it is lowkey a whole personality. ✨


πŸŽ€ NAME πŸŽ€

eza β€” a modern replacement for ls


🌸 SYNOPSIS 🌸

eza [options] [files...]

eza is a modern replacement for ls. It uses colours for information by default, which literally helps you tell apart all the many types of files β€” like whether you're the owner, or whether you're in the owning group. iykyk πŸ’…

It also has extra features that the original ls simply does not have, such as viewing the Git status for a directory, or recursing into directories with a tree view. iconic behaviour, no cap 🌈


πŸ¦‹ EXAMPLES πŸ¦‹

  • eza β€” lists the contents of the current directory in a grid. yes, that's it, that's the whole vibe 🫢
eza --oneline --reverse --sort=size

Displays a list of files with the largest at the top. biggest first, main character energy πŸ‘‘

eza --long --header --inode --git

Displays a table of files with a header, showing each file's metadata, inode, and Git status. the full info dump, we love to see it πŸŽ€

eza --long --tree --level=3

Displays a tree of files, three levels deep, as well as each file's metadata. nesting dolls but make it directories πŸͺ†


⭐ META OPTIONS ⭐

  • --help β€” show the list of command-line options. your little map πŸ—ΊοΈ
  • -v, --version β€” show the version of eza. gotta know what you're working with πŸ’œ

πŸ’… DISPLAY OPTIONS πŸ’…

  • -1, --oneline β€” display one entry per line. simple, clean, slay ✨
  • --absolute=WHEN β€” display entries with their absolute path.

Valid settings are on, follow, and off. When used without a value, it defaults to on.

on: show absolute paths for all entries. follow: show absolute paths and resolve symbolic links to their targets. off: show relative paths (this is the default behavior). pick your fighter πŸ₯Š

  • -F, --classify=WHEN β€” display file kind indicators next to file names.

Valid settings are always, automatic (or auto for short), and never. When used without a value, it defaults to automatic.

automatic or auto will display file kind indicators only when the standard output is connected to a real terminal. If eza is ran while in a tty, or the output of eza is either redirected to a file or piped into another program, file kind indicators will not be used. Setting this option to always causes eza to always display file kind indicators, while never disables the use of file kind indicators. πŸ¦‹

  • -G, --grid β€” display entries as a grid (this is the default). the classic look πŸ’–
  • -l, --long β€” display extended file metadata as a table. all the tea β˜•
  • -R, --recurse β€” recurse into directories. go deeper πŸ”₯
  • -T, --tree β€” recurse into directories as a tree. go deeper but make it aesthetic 🌳
  • --code[=MODE] β€” print a lines-of-code summary by language instead of listing files, in the spirit of tools like tokei and cloc.

The given paths (or the current directory) are walked recursively, honouring a git repository's .gitignore when one is present, and each recognised language is reported with its file, line, code, comment, and blank counts, plus a bar visualising its share of the code.

Valid modes are lines, percent, and both (the default). pick your flavour πŸ“

  • --follow-symlinks β€” drill down into symbolic links that point to directories. following the plot 🧚
  • -X, --dereference β€” dereference symbolic links when displaying information. show me the real you πŸ™ˆ
  • -x, --across β€” sort the grid across, rather than downwards. left to right, not top to bottom πŸ’«
  • --color=WHEN, --colour=WHEN β€” when to use terminal colours (using ANSI escape code to colorize the output).

Valid settings are always, automatic (or auto for short), and never. When used without a value, it defaults to automatic.

The default behavior (automatic or auto) is to colorize the output only when the standard output is connected to a real terminal. If the output of eza is redirected to a file or piped into another program, terminal colors will not be used. Setting this option to always causes eza to always output terminal color, while never disables the use of terminal color.

ngl this one matters: manually setting this option overrides the NO_COLOR environment. so like, you asked for it bestie πŸ’€
  • --color-scale, --colour-scale β€” highlight levels of field distinctly. use a comma(,) separated list of all, age, size. gradients but for your file listing 🌈
  • --color-scale-mode=MODE, --colour-scale-mode=MODE β€” use gradient or fixed colors in --color-scale.

Valid options are fixed or gradient. When used without a value, it defaults to gradient.

  • --icons=WHEN β€” display icons next to file names.

Valid settings are always, automatic (auto for short), and never. When used without a value, it defaults to automatic.

automatic or auto will display icons only when the standard output is connected to a real terminal. If eza is ran while in a tty, or the output of eza is either redirected to a file or piped into another program, icons will not be used. Setting this option to always causes eza to always display icons, while never disables the use of icons. πŸŽ€

  • --no-quotes β€” don't quote file names with spaces. no quotation marks, no problem ✨
  • --short-nix β€” abbreviate Nix store hashes in file names and paths.

A path component beginning with a Nix store hash β€” exactly 32 characters of Nix's base32 alphabet followed by a dash, like vlkia5wk0svsikwv50554mh06iayg2m2-source.drv β€” is displayed with the hash shortened to its first 8 characters and an ellipsis, painted dim so the name stands out: vlkia5wk...-source.drv.

This applies to listed names, symbolic link targets, and absolute paths. tiny hash, big mood πŸ’œ

  • --hyperlink=WHEN β€” display entries as hyperlinks.

Valid settings are always, automatic (auto for short), and never. When used without a value, it defaults to automatic.

automatic or auto will display hyperlinks only when the standard output is connected to a real terminal. If eza is ran while in a tty, or the output of eza is either redirected to a file or piped into another program, hyperlinks will not be used. Setting this option to always causes eza to always display hyperlinks, while never disables the use of hyperlinks. πŸ”—

  • -w, --width=COLS β€” set screen width in columns. you're in charge of the vibes now πŸ“

πŸ”₯ FILTERING AND SORTING OPTIONS πŸ”₯

  • -a, --all β€” show hidden and "dot" files. use this twice to also show the . and .. directories. the hidden lore 🫣
  • -A, --almost-all β€” equivalent to --all; included for compatibility with ls -A. basically the same fit, different name πŸ’…
  • -d, --treat-dirs-as-files β€” this flag, inherited from ls, changes how eza handles directory arguments.

Instead of recursing into directories and listing their contents (which is the default behavior), it treats directories as regular files and lists information about the directory entry itself. This is useful when you want to see metadata about the directory (e.g., permissions, size, modification time) rather than its contents.

For simply listing only directories and not files, consider using the --only-dirs (-D) option as an alternative. πŸŽ€

  • -L, --level=DEPTH β€” limit the depth of recursion. know when to stop πŸ›‘
  • -r, --reverse β€” reverse the sort order. flip it πŸ”„
  • -s, --sort=SORT_FIELD β€” which field to sort by.

Valid sort fields are name, Name, extension, Extension, size, modified, changed, accessed, created, inode, type, and none.

The modified sort field has the aliases date, time, and newest, and its reverse order has the aliases age and oldest. aliases galore 😭

Sort fields starting with a capital letter will sort uppercase before lowercase: A then B then a then b. Fields starting with a lowercase letter will mix them: A then a then B then b. case sensitivity is doing the most here 🧐

  • -I, --ignore-glob=GLOBS β€” glob patterns, pipe-separated, of files to ignore. blocklist them πŸ’€
  • --git-ignore [if eza was built with git support] β€” do not list files that are ignored by Git. respect the .gitignore, periodt ✨
  • --group-directories-first β€” list directories before other files. folders get priority πŸ‘‘
  • --group-directories-last β€” list directories after other files. folders get the encore 🌟
  • -D, --only-dirs β€” list only directories, not files. folders only, we stan πŸŽ€
  • -f, --only-files β€” list only files, not directories. files only, no folders allowed πŸ™…
  • --show-symlinks β€” explicitly show symbolic links (when used with --only-files | --only-dirs). come back, links πŸ’–
  • --no-symlinks β€” do not show symbolic links. links, you are uninvited 🚫

okay that's the first chunk bestie, and there's more coming, so don't go anywhere πŸ’œ

πŸ’… LONG VIEW OPTIONS

okay bestie, these ones only show up when you're running with --long (-l) β€” like, they're the ✨accessories✨ to your long-view fit. πŸŽ€

  • -b, --binary β€” lists file sizes with binary prefixes. cute little Ki, Mi vibes 🧚
  • -B, --bytes β€” lists file sizes in bytes, no prefixes at all. just raw numbers, no cap πŸ“
  • --changed β€” uses the changed timestamp field instead, iykyk
  • -g, --group β€” lists each file's group. group chat energy fr 🫢
  • --smart-group β€” only shows the group if it's got a different name from the owner. smart, lowkey minimal πŸ’…
  • -h, --header β€” adds a header row to each column. so organized, main character energy πŸ‘‘
  • -H, --links β€” lists each file's number of hard links
  • -i, --inode β€” lists each file's inode number
  • --loc[=MODE] β€” adds a language column and a lines-of-code column to the long view. Only regular files in a recognised programming language get counted, and the counting is comment-aware, so the code column excludes comment and blank lines ✨. Valid modes are lines (the count of code lines), percent (each file's share of the code in the whole tree), and both (which is the default). In percent and both modes, the denominator is the total code across the recursed tree β€” or the git repository if one is present. obsessed with the accuracy of it all πŸ“
  • -m, --modified β€” uses the modified timestamp field
  • -M, --mounts β€” shows mount details (Linux and Mac only)
  • -n, --numeric β€” lists numeric user and group IDs. no names, just numbers, periodt
  • -O, --flags β€” lists file flags on Mac and BSD systems, and file attributes on Windows systems. By default, Windows attributes are displayed in a long form. To display attributes as a single character, set the environment variable EZA_WINDOWS_ATTRIBUTES=short. On BSD systems, see chflags(1) for a list of file flags and their meanings πŸ¦‹
  • -S, --blocksize β€” lists each file's size of allocated file system blocks
  • -t, --time=WORD β€” which timestamp field to list. Valid timestamp fields are modified, changed, accessed, and created. pick your fighter ⭐
  • --time-style=STYLE β€” how to format timestamps. Valid timestamp styles are default, iso, long-iso, full-iso, relative, or a custom style +<FORMAT> (e.g., +%Y-%m-%d %H:%M => 2023-09-30 13:00). πŸ’–

<FORMAT> should be a chrono format string. For details on the chrono format syntax, please read: https://docs.rs/chrono/latest/chrono/format/strftime/index.html.

Alternatively, <FORMAT> can be a two line string β€” the first line will be used for non-recent files and the second for recent files. E.g., if <FORMAT> is "%Y-%m-%d %H<newline>--%m-%d %H:%M", then non-recent files => "2022-12-30 13", and recent files => "--09-30 13:34". two moods, one format 🌈

  • --total-size β€” shows recursive directory size (unix only)
  • -u, --accessed β€” uses the accessed timestamp field
  • -U, --created β€” uses the created timestamp field
  • --no-permissions β€” suppresses the permissions field
  • -o, --octal-permissions β€” lists each file's permissions in octal format
  • --no-filesize β€” suppresses the file size field
  • --no-user β€” suppresses the user field
  • --no-time β€” suppresses the time field
  • --stdin β€” for when you wish to pipe directories to eza / read from stdin. Separate one per line, or define a custom separation char in the EZA_STDIN_SEPARATOR env variable 🧚
  • -@, --extended β€” lists each file's extended attributes and sizes
  • -Z, --context β€” lists each file's security context
  • --git [if eza was built with git support] β€” lists each file's Git status, if tracked. This adds a two-character column indicating the staged and unstaged statuses respectively πŸ’€. The status character can be - for not modified, M for a modified file, N for a new file, D for deleted, R for renamed, T for type-change, I for ignored, and U for conflicted. Directories will be shown to have the status of their contents β€” which is how deleted is possible: if a directory contains a file that has a certain status, the directory will be shown to have that status. literally inheriting the whole vibe of its contents 😭
  • --git-repos [if eza was built with git support] β€” lists each directory's Git status, if tracked. Symbols shown are |= clean, += dirty, and ~= for unknown πŸ¦‹
  • --git-repos-no-status [if eza was built with git support] β€” lists if a directory is a Git repository, but not its status. All Git repository directories will be shown as (themed) - without status indicated
  • --no-git β€” don't show Git status (always overrides --git, --git-repos, --git-repos-no-status). the final boss of git flags πŸ‘‘

🌸 ENVIRONMENT VARIABLES 🌸

okay so, if an environment variable prefixed with EZA_ is not set, then for backward compatibility it will default to its counterpart starting with EXA_. cute little legacy moment πŸ’œ

eza responds to the following environment variables:

COLUMNS

Overrides the width of the terminal, in characters β€” however, -w takes precedence, so -w is lowkey the main character here πŸ’…

For example, COLUMNS=80 eza will show a grid view with a maximum width of 80 characters.

This option won't do anything when eza's output doesn't wrap, such as when using the --long view. ngl it just sits there vibing for nothing πŸ™ˆ

EZA_STRICT

Enables strict mode, which will make eza error when two command-line options are incompatible ⚠️

Usually, options can override each other going right-to-left on the command line, so that eza can be given aliases: creating an alias eza=eza --sort=ext and then running eza --sort=size with that alias will run eza --sort=ext --sort=size, and the sorting specified by the user will override the sorting specified by the alias. iconic override behaviour tbh ✨

In strict mode, the two options will not co-operate, and eza will error. no peace, no compromise πŸ’€

This option is intended for use with automated scripts and other situations where you want to be certain you're typing in the right command.

EZA_GRID_ROWS

Limits the grid-details view (eza --grid --long) so it's only activated when at least the given number of rows of output would be generated 🌈

With widescreen displays, it's possible for the grid to look very wide and sparse β€” on just one or two lines, with none of the columns lining up. By specifying a minimum number of rows, you can only use the view if it's going to be worth using. protecting you from an ugly spread, we love to see it 🫢

EZA_ICON_SPACING

Specifies the number of spaces to print between an icon (see the --icons option) and its file name πŸŽ€

Different terminals display icons differently, as they usually take up more than one character width on screen, so there's no "standard" number of spaces that eza can use to separate an icon from text. One space may place the icon too close to the text, and two spaces may place it too far away. So the choice is left up to the user to configure depending on their terminal emulator. bespoke spacing, just for you πŸ¦‹

NO_COLOR

Disables colours in the output (regardless of its value). Can be overridden by the --color option.

See https://no-color.org/ for details. 🎨

LS_COLORS, EZA_COLORS

Specifies the colour scheme used to highlight files based on their name and kind, as well as highlighting metadata and parts of the UI πŸ’–

For more information on the format of these environment variables, see the eza_colors.5.md manual page. ✨

EZA_OVERRIDE_GIT

Overrides any --git or --git-repos argument. it said what it said πŸ’…

EZA_MIN_LUMINANCE

Specifies the minimum luminance to use when color-scale is active. Its value can be between -100 to 100. 🌟

EZA_ICONS_AUTO

If set, automates the same behavior as using --icons or --icons=auto. Useful for if you always want to have icons enabled. set it and forget it, honestly iconic πŸ‘‘

Any explicit use of the --icons=WHEN flag overrides this behavior.

EZA_STDIN_SEPARATOR

Specifies the separator to use when file names are piped from stdin. Defaults to newline. 🌸

EZA_CONFIG_DIR

Specifies the directory where eza will look for its configuration and theme files. Defaults to $XDG_CONFIG_HOME/eza or $HOME/.config/eza if XDG_CONFIG_HOME is not set. your config lives there, bestie 🏠


πŸ’€ EXIT STATUSES πŸ’€

like, what does the number even mean? here's the tea:

  • 0 β€” if everything goes OK πŸŽ‰
  • 1 β€” if there was an I/O error during operation 😭
  • 3 β€” if there was a problem with the command-line arguments πŸ™ˆ
  • 13 β€” if permission is denied to access a path 🚫

πŸ‘‘ AUTHOR πŸ‘‘

eza is maintained by Christina Sørensen and many other contributors. 🫢

Source code: https://github.com/eza-community/eza Contributors: https://github.com/eza-community/eza/graphs/contributors

Our infinite thanks to Benjamin `ogham' Sago and all the other contributors of exa, from which eza was forked. the origin story, we love a lore drop πŸ’œ


πŸ”₯ SEE ALSO πŸ”₯


aaaand that's the whole page bestie!! πŸŽ€ this gorgeous little manual comes from the eza source/version, dated as shown at the bottom of the original page β€” go check eza --version if you want the exact numbers, mwah πŸ’–βœ¨ slay responsibly, and remember: eza_colors(5) is your next read. periodt. πŸ¦‹

πŸ“¦ where this page comes from