Inspect, edit, search, and transform files with familiar command-line tools.
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.
Show 58 flags
ls in columns or in long format, with names escaped.
Show 58 flags
Show metadata.
Show 6 flags
Show a directory tree.
Show 43 flags
Count file and directory bytes.
Show 27 flags
Show mount capacity, when available.
Show 8 flags
List configured mounts. Mounting is refused, as for an unprivileged user: mounts come from the configuration. -t filters the list.
Show 12 flags
Mount all filesystems mentioned in fstab.
Dry run; skip the mount(2) syscall.
Show also filesystem labels.
Don’t write to /etc/mtab.
Comma-separated list of mount options.
Mount the filesystem read-only.
Limit the set of filesystem types.
Say what is being done.
Mount the filesystem read-write (default).
Mount a subtree somewhere else.
Move a subtree to some other place.
Mount a subtree and all submounts somewhere else.
Identify content type.
Show 4 flags
Create directories.
Show 4 flags
Create files or update timestamps.
Show 9 flags
Copy files or directories, including across mounts.
Show 26 flags
Move or rename entries.
Show 12 flags
Remove entries.
Show 9 flags
Remove empty directories.
Show 3 flags
Remove one entry.
Resize a file.
Show 4 flags
Create a temporary file or directory.
Show 7 flags
Create a symbolic link or copy a file’s bytes.
Show 13 flags
Copy a file’s bytes to a new name.
Check that names are valid or portable.
Show 3 flags
Read a link or resolve its target.
Show 8 flags
Resolve a path.
Show 10 flags
Remove a directory prefix or suffix.
Show 3 flags
Print the parent path.
Show 1 flag
Set permission metadata.
Show 11 flags
Set owner or group metadata.
Show 14 flags
Set owner or group metadata.
Show 13 flags
Read extended attributes.
Show 11 flags
Get the named extended attribute value.
Get all extended attribute values.
Encode values (as ‘text’, ‘hex’ or ‘base64’).
Only get attributes with names matching pattern.
Print the bare values only.
Do not dereference symbolic links.
Don’t strip leading ’/’ in pathnames.
Recurse into subdirectories.
Logical walk, follow symbolic links.
Physical walk, do not follow symbolic links.
Stay on the mount each path starts on.
Set or remove an extended attribute.
Show 6 flags
Set the value of the named extended attribute.
Remove the named extended attribute.
Use value as the attribute value.
Do not dereference symbolic links.
Store each value exactly as typed, undecoded.
Set the attributes a getfattr —dump listing names.
Search and compare
Select paths and run actions.
Show 77 flags
Run a command on each path, {} standing for it.
Run a command once on many paths.
Run a command from each path’s directory.
Run a command once per directory.
Search lines.
Show 48 flags
Search recursively with path filters.
Show 146 flags
Find entries by name under ignore rules.
Show 30 flags
Search through a backend’s search capability.
Show 3 flags
Ranking method: semantic (default); Dify also takes fulltext, hybrid and keyword.
Most hits to print; the mount’s default when absent.
Lowest score a hit needs, or on LanceDB the largest distance it may have; 0 keeps every hit.
Compare text files or directory trees.
Show 38 flags
Compare bytes.
Show 6 flags
Apply a patch.
Show 20 flags
Find lines with a prefix.
Show 3 flags
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.
Show 10 flags
Read the beginning.
Show 6 flags
Read the end or follow changes.
Show 12 flags
Count lines, words, bytes, or characters.
Show 7 flags
Order lines.
Show 25 flags
Filter adjacent repeated lines.
Show 11 flags
Select fields, bytes, or characters.
Show 13 flags
Translate, delete, or squeeze characters.
Show 5 flags
Edit a text stream.
Show 14 flags
Rewrite each file; -iSUFFIX keeps a backup.
One piece of the script, joined in order.
Read a piece of the script from FILE.
With -i, rewrite what a link points to.
Print only what the script prints.
Show the program and trace each command.
Read regular expressions as ERE.
Wrap l output at N chars; 0 never wraps.
Refuse what POSIX sed does not have.
Refuse running programs and opening files.
Number lines and match $ per file.
Read only as far as each line needs.
Lines end at NUL, not newline.
Accepted; input is always raw bytes.
Process records and fields.
Show 3 flags
Copy stdin to stdout and files.
Show 4 flags
Combine lines into columns.
Show 3 flags
Join sorted files on a field.
Show 13 flags
Compare sorted lines.
Show 8 flags
Split input into files.
Show 12 flags
Split at line numbers or patterns.
Show 8 flags
Number lines.
Show 11 flags
Reverse record order.
Show 3 flags
Reverse characters in each line.
Show 1 flag
Arrange text into columns.
Show 19 flags
Wrap long lines.
Show 4 flags
Reflow paragraphs.
Show 7 flags
Convert tabs and spaces.
Show 2 flags
Convert tabs and spaces.
Show 3 flags
Extract printable strings.
Show 10 flags
Read the whole file (always so).
Read the data sections (the whole file here).
Name the file before each string.
The fewest characters a string has (4).
Print each offset in base o, d or x.
The same as -t o.
Let any whitespace belong to a string.
The object format (ignored: every file is bytes).
Character width and order: s, S, b, l, B or L.
What follows each string instead of a newline.
Generate a number sequence.
Show 3 flags
Use the given string as separator between numbers.
Pad numbers with zeros to equal width.
Format each number with a printf-style format string.
Shuffle or sample lines.
Show 7 flags
Sort dependency pairs.
Remove columns from each line.
Fill environment variables into text.
Show 1 flag
Repeat a line until the reader stops.
Convert numeric units.
Show 14 flags
Running commands and inspecting the environment
Build commands from input.
Show 21 flags
Input items are terminated by NUL.
Read items from this file, not standard input.
Input items are separated by this character.
Stop reading at this logical end-of-file string.
Same as -E; no string turns it off.
Replace this string in the initial arguments with each input line.
Same as -I, with {} when no string is attached.
Use at most N non-blank input lines per command line.
Same as -L, with 1 when no count is attached.
Use at most N arguments per command line.
Reopen stdin as the terminal in each command (there is no terminal, so this fails).
Prompt before running each command (there is no terminal, so this fails).
Do not run the command on empty input.
Limit a command line to N bytes.
Print each command on stderr before running it.
Show the command-line length limits.
Exit if a command line exceeds the size limit.
Run up to N commands at a time; 0 runs them all at once.
Set this variable to each command’s slot number.
Show version information and exit.
Show this help and exit.
Limit a command’s running time.
Show 7 flags
Signal only the command, not its process group.
Also send KILL this long after the first signal.
Exit with the command’s status even when it times out.
Signal to send on timeout (default TERM).
Report each signal sent on stderr.
Show this help and exit.
Show version information and exit.
Run a command with no change to how it runs here.
Run a command with no change to how it runs here.
Show 1 flag
Run a command with no change to how it runs here.
Show 3 flags
Run a command with no change to how it runs here.
Show 3 flags
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.
Show 9 flags
Display the time described by the given date string.
Output date/time in ISO 8601 format, to the given precision (default date).
Output date in RFC 5322 email format.
Output date/time in RFC 3339 format, to the given precision.
Use Coordinated Universal Time (UTC).
Use Coordinated Universal Time (UTC).
Display the time the given file was last modified.
Display the time each line of the given file describes, as -d would.
Display the resolution of the times shown.
Report system or host information.
Show 9 flags
Print all information, omitting -p and -i if unknown.
Print the kernel name.
Print the network node hostname.
Print the kernel release.
Print the kernel version.
Print the machine hardware name.
Print the processor type.
Print the hardware platform.
Print the operating system.
Report system or host information.
Show 13 flags
Alias names.
All long host names (FQDNs).
Set default hostname if none available.
DNS domain name.
Long host name (FQDN).
Long host name (FQDN).
Read host name or NIS domain name from given file.
Addresses for the host name.
All addresses for the host.
Short host name.
NIS/YP domain name.
NIS/YP domain name.
Answer for this machine only.
Report system or host information.
Report system or host information.
Report system or host information.
Show 3 flags
Answer for this machine only.
Report identity: a session with no profile is root, one with a profile is that profile’s user, and nobody logs in.
Show 8 flags
Ignore, for compatibility with other versions.
Print only the security context of the process.
Print only the effective group ID.
Print all group IDs.
Print a name instead of a number, for -u,-g,-G.
Print the real ID instead of the effective ID, with -u,-g,-G.
Print only the effective user ID.
Delimit entries with NUL characters, not whitespace; not permitted in default format.
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.
Show 14 flags
Report that there is no terminal, or check that files exist.
Show 1 flag
Report that there is no terminal, or check that files exist.
Show 2 flags
Query configuration values.
Show 2 flags
Print every variable and its value.
Give values for compilation environment SPEC.
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.