Skip to main content
Unix commands over every mount. A mount’s capabilities and the session’s permissions decide which ones run there. Expand a command to see every flag it takes, read from the same grammar the shell parses with; man COMMAND prints its manual. A familiar name does not promise every option of the original program.

Files and directories

List entries.
ls in columns or in long format, with names escaped.
Show metadata.
Show a directory tree.
Count file and directory bytes.
Show mount capacity, when available.
List configured mounts. Mounting is refused, as for an unprivileged user: mounts come from the configuration. -t filters the list.
Identify content type.
Create directories.
Create files or update timestamps.
Copy files or directories, including across mounts.
Move or rename entries.
Remove entries.
Remove empty directories.
Remove one entry.
Resize a file.
Create a temporary file or directory.
Create a symbolic link or copy a file’s bytes.
Copy a file’s bytes to a new name.
Check that names are valid or portable.
Read a link or resolve its target.
Resolve a path.
Remove a directory prefix or suffix.
Print the parent path.
Set permission metadata.
Set owner or group metadata.
Set owner or group metadata.
Read extended attributes.
Set or remove an extended attribute.

Search and compare

Select paths and run actions.
Search lines.
Search recursively with path filters.
Find entries by name under ignore rules.
Search through a backend’s search capability.
Compare text files or directory trees.
Compare bytes.
Apply a patch.
Find lines with a prefix.
egrep, fgrep and rgrep invoke grep with -E, -F and -r respectively. zcmp and zdiff compare gzip files with cmp and diff. Compressed-file search is covered under Data & Network.

Text processing

Read and concatenate files.
Read the beginning.
Read the end or follow changes.
Count lines, words, bytes, or characters.
Order lines.
Filter adjacent repeated lines.
Select fields, bytes, or characters.
Translate, delete, or squeeze characters.
Edit a text stream.
Process records and fields.
Copy stdin to stdout and files.
Combine lines into columns.
Join sorted files on a field.
Compare sorted lines.
Split input into files.
Split at line numbers or patterns.
Number lines.
Reverse record order.
Reverse characters in each line.
Arrange text into columns.
Wrap long lines.
Reflow paragraphs.
Convert tabs and spaces.
Convert tabs and spaces.
Extract printable strings.
Generate a number sequence.
Shuffle or sample lines.
Sort dependency pairs.
Remove columns from each line.
Fill environment variables into text.
Repeat a line until the reader stops.
Convert numeric units.

Running commands and inspecting the environment

Build commands from input.
Limit a command’s running time.
Run a command with no change to how it runs here.
Run a command with no change to how it runs here.
Run a command with no change to how it runs here.
Run a command with no change to how it runs here.
Wait for a duration.
Run with environment changes or print exported variables. Options: -i, -u NAME, NAME=VALUE.
Run with environment changes or print exported variables. Options: NAME.
Format a date or time.
Report system or host information.
Report system or host information.
Report system or host information.
Report system or host information.
Report system or host information.
Report identity: a session with no profile is root, one with a profile is that profile’s user, and nobody logs in.
Report identity: a session with no profile is root, one with a profile is that profile’s user, and nobody logs in. Options: No options.
Report identity: a session with no profile is root, one with a profile is that profile’s user, and nobody logs in.
Report identity: a session with no profile is root, one with a profile is that profile’s user, and nobody logs in.
Report identity: a session with no profile is root, one with a profile is that profile’s user, and nobody logs in.
Report identity: a session with no profile is root, one with a profile is that profile’s user, and nobody logs in.
Report that there is no terminal, or check that files exist.
Report that there is no terminal, or check that files exist.
Query configuration values.
python3, node and js run on a machine, through a runtime or a program installed there.

Limits

  • rm -i and -I are accepted but ignored; deletion does not prompt for confirmation.
  • File operations depend on the backend; a read-only mount cannot accept writes. Permission and owner metadata may live in Mirage’s overlay rather than the remote service.
  • Mount roots are protected from removal, renaming, and use as copy sources. mount lists configured mounts; it does not attach new backends.
  • ln -s creates a virtual symlink. Without -s, a regular file is copied; there is no shared hard-link inode.
  • find supports -a, -o, !, parentheses, and both -exec ... \; and -exec ... {} +. Tests must precede actions in each AND chain, and OR branches must use the same action. -newer and -newermt must be in a top-level AND chain. -ok and -okdir are unsupported.
  • rg cannot sort by creation time. ls --color and grep --color are accepted without colored output.
  • Under a UTF-8 locale (LANG=C.UTF-8), find names a file or a value between ‘ and ’, as Linux’s does. Other commands keep straight quotes in their messages.
  • Under a UTF-8 locale, sed, grep, expr, nl, [[ =~ ]] and git’s filters match whole characters. A pattern byte that is only part of one, such as \xa9 against é (bytes C3 A9), matches nothing there, where Linux’s sed can match it inside the character.
  • In rare patterns, sed, expr and [[ =~ ]] capture different text in a group than Linux does, or find a match where Linux finds none. Such a pattern repeats a group that holds an anchor (^, $, \b, \<, \>) or can match nothing, or refers back to one. For example, [[ ab =~ (a|b|$){1,3} ]] leaves BASH_REMATCH[1] empty where Linux sets it to b, and echo babc | sed 's/\(\<[a-][ab]\|[a-c]\)\{2\}/<&>/' prints <ba>bc where Linux prints babc.
  • getconf -a lists the same variables and values as Linux, in the order of POSIX’s tables rather than the C library’s.
  • xargs -p and -o fail because there is no terminal. timeout signals its command as kill does, so a program can handle the signal; a Mirage command cannot trap one.