{
"schema_version": "1.0",
"command": "mv",
"variant": "bsd",
"match": {
"platform": ["macos", "freebsd"],
"probe": { "args": ["--version"], "expect": "failure" },
"binary_globs": ["/bin/mv", "/usr/bin/mv"]
},
"mode": "authoritative",
"confidence": "verified",
"provenance": {
"platform": "macos",
"tool_version": "macOS 26.3",
"source": "man-page",
"checked_on": "2026-07-27",
"command": "man -P cat mv | col -b",
"environment": "macOS 26.3 (Darwin arm64), system /bin/mv",
"notes": "The SYNOPSIS lines 'mv [-f | -i | -n] [-hv] source target' enumerate exactly the five options documented under 'The following options are available:', so the option set is complete and this overlay is authoritative. The -f/-i/-n exclusion comes from the SYNOPSIS bracket group and from the parenthesised override sentence in each of those three descriptions. BSD mv rejects --version (exit 64, 'illegal option -- -'), which is why the probe matches on failure."
},
"description": "In its first form, the mv utility renames the file named by the source operand to the destination path named by the target operand. This form is assumed when the last operand does not name an already existing directory. In its second form, mv moves each file named by a source operand to a destination file in the existing directory named by the directory operand.",
"flags": [
{ "short": "-f", "type": "boolean", "conflicts_with": ["-i", "-n"], "description": "Do not prompt for confirmation before overwriting the destination path. (The -f option overrides any previous -i or -n options.)" },
{ "short": "-h", "type": "boolean", "description": "If the target operand is a symbolic link to a directory, do not follow it. This causes mv to rename source to the destination path target rather than moving source into the directory referenced by target." },
{ "short": "-i", "type": "boolean", "conflicts_with": ["-f", "-n"], "description": "Cause mv to write a prompt to standard error before moving a file that would overwrite an existing file. If the response begins with `y' or `Y', the move is attempted. (The -i option overrides any previous -f or -n options.)" },
{ "short": "-n", "type": "boolean", "conflicts_with": ["-f", "-i"], "description": "Do not overwrite an existing file. (The -n option overrides any previous -f or -i options.)" },
{ "short": "-v", "type": "boolean", "description": "Cause mv to be verbose, showing files after they are moved." }
],
"positional_args": [
{ "name": "source", "type": "path", "variadic": true, "required": true, "description": "File to rename or move. More than one source requires the last operand to be an existing directory." },
{ "name": "target", "type": "path", "required": true, "description": "Destination path in the first form, or the existing directory to move into in the second." }
],
"annotations": {
"readonly": false,
"destructive": true,
"idempotent": false,
"requires_approval": true
}
}