exa

Command-line options

The main way to configure exa is by passing options on the command-line.

Display Options

-1, --oneline

Displays one file per line.

-G, --grid

Displays files as a grid.

This is the default.

-l, --long

Displays files in a table along with their metadata.

-x, --across

Sort the grid across, rather than downwards.

-R, --recurse

Recurses into directories.

-T, --tree

Recurses into directories as a tree.

-L, --level=DEPTH

Limits the depth of recursion, so exa only descends up to the given number of times.

-F, --classify

Displays file type indicators by file names.

--color, --colour=WHEN

Configures when to use terminal colours. The default choice is automatic, meaning that colours are used when exa is writing to a terminal, and are switched off if it’s not.

  • automatic or auto only display colours when writing to a terminal.
  • always displays them even if it’s not.
  • never doesn’t display them even if it is.

--icons

Displays Unicode icons by file names.

--no-icons

Don’t display icons (overrides --icons).

Filtering and Sorting Options

-a, --all

Shows hidden and ‘dot’ files.

Use this twice to also show the . and .. directories.

-d, --no-recurse, --list-dirs

Lists directories without recursing into them, as though they were regular files.

-r, --reverse

Reverses the sort order.

-s, --sort=SORT_FIELD

Configures which field to sort by.

  • name or filename sorts by name, case-insensitively.
  • Name or Filename sorts by name, case-sensitively.
  • cname or cfilename sorts by name, case-insensitively and canonically.
  • Cname or Cfilename sorts by name, case-sensitively and canonically.
  • .name or .filename sorts by name without a leading dot, case-insensitively.
  • .Name or .Filename sorts by name without a leading dot, case-sensitively.
  • size or filesize sorts by size, with smaller files listed first.
  • ext or extension sorts by file extension, case-insensitively.
  • Ext or Extension sorts by file extension, case-sensitively.
  • mod or modified sorts by file modified date, with older files listed first.
  • acc or accessed sorts by file accessed date.
  • cr or created sorts by file created date.
  • inode sorts by file inode.
  • type sorts by the type of file (directory, socket, link).
  • none disables sorting, and lists files in an arbitrary order.

The modified field has the aliases date, time, and new, and newest. Also, because we usually think about dates relatively, its reverse has the aliases age, old, and oldest.

Fields starting with a capital letter will sort uppercase before lowercase.

Canonical sorting means that numbers will be treated as strings of digits instead of numbers. Normally, 9 comes before 10, but sorting by Cname will sort 10 before 9 because it sees the 1 digit first.

-I, --ignore-glob=GLOBS

Glob patterns, pipe-separated, of files to ignore.

--git-ignore

Ignores files mentioned in .gitignore.

--group-directories-first

Lists directories before other files when sorting.

Long View Options

These options are available when running with --long (-l):

-b, --binary

Lists file sizes with binary prefixes.

-B, --bytes

list file sizes in bytes, without any prefixes.

-g, --group

Lists each file’s group.

-h, --header

Adds a header row to each column in the table.

-H, --links

Lists each file’s number of hard links.

-i, --inode

Lists each file’s inode number.

-m, --modified

Uses the modified timestamp field.

-S, --blocks

Lists each file’s filesystem block count.

-t, --time=WORD

Configures which timestamp field to list (modified, accessed, created).

--time-style=STYLE

Configures which format timestamps should be in.

  • default uses the current locale to print month names, specifies the timestamp down to the minute for times in the current year, and down to the day for previous years.
  • iso does the same, except using a month for the number so it doesn’t need to look up the locale.
  • long-iso specifies the timestamp down to the minute without using the locale or current year.
  • full-iso specifies the timestamp down to the millisecond, including its offset down to the minute, without using the locale or current year.

-u, --accessed

Uses the accessed timestamp field.

-U, --created

Uses the created timestamp field.

-@, --extended

Lists each file’s extended attributes and sizes.

--git

Lists each file’s Git status, if tracked.

--color-scale, --colour-scale

Highlights levels of file size distinctly.

--no-permissions

Suppress the permissions column.

--no-filesize

Suppress the file size column.

--no-user

Suppress the user column.

--no-time

Suppress the time column.