mv(1) on Solnix vs Linux and the BSDs
On Solnix, mv is the illumos mv at /usr/bin/mv, not GNU mv. It has -f, -i, -n and -T, but no -v, no -t and no GNU long options, so scripts that use them fail. Its -f/-i precedence rule also differs from every counterpart.
The manual pages
- Solnix: mv(1) from
pkgs.solnix.illumos-world-man· illumos.org - Linux: mv(1) coreutils-full-9.11
- FreeBSD: mv(1) 15.1-RELEASE
- OpenBSD: mv(1) 8.0
- NetBSD: mv(1) 11.0
- Standard: POSIX.1-2024 (IEEE Std 1003.1-2024),
mv
What Solnix runs
A default Solnix system runs the illumos /usr/bin/mv. /usr/xpg4/bin/mv is also shipped with the same synopsis. The only documented difference is option precedence. In /usr/bin/mv, -f overrides every -i wherever it appears. In /usr/xpg4/bin/mv, the last of -f, -i and -n wins. /usr/xpg4/bin/mv also prints a diagnostic for every failed attempt to duplicate file characteristics on a cross-file-system move.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| all four | no -v | Solnix mv has no -v and no way to list moved files. Linux, FreeBSD, OpenBSD and NetBSD all accept -v, so a script that uses it fails on Solnix.Source: Solnix mv(1) SYNOPSIS and OPTIONS (-f -i -n -T only); Linux mv(1) -v; FreeBSD mv(1) -v; OpenBSD mv(1) -v; NetBSD mv(1) -v |
| Linux | -t and GNU long options | Solnix has no -t DIRECTORY, so mv -t dir files... fails. It also has no --backup/-b, -S, --update/-u, -Z, --exchange, --no-copy or --strip-trailing-slashes. Its only long-form substitute is the -T form of the synopsis.Source: Linux mv(1) SYNOPSIS, -t, --backup, -S, --update, -Z, --exchange, --no-copy, --strip-trailing-slashes; Solnix mv(1) SYNOPSIS |
| FreeBSD, OpenBSD, NetBSD | -T | Solnix -T treats the target as a file. With a directory target, mv does not move the source into it, and it can replace an empty directory with a source directory. FreeBSD, OpenBSD and NetBSD have no -T.Source: Solnix mv(1) OPTIONS -T and DESCRIPTION (third synopsis form); FreeBSD/OpenBSD/NetBSD mv(1) SYNOPSIS |
| FreeBSD, NetBSD | -h | FreeBSD and NetBSD -h renames onto a target that is a symlink to a directory instead of moving into it. Solnix has no -h. The nearest equivalent is -T, which Solnix describes only as treating target as a file.Source: FreeBSD mv(1) -h; NetBSD mv(1) -h; Solnix mv(1) -T |
| OpenBSD, NetBSD | -n availability | Solnix -n skips an existing target without an error and overrides earlier -i and -f. Linux and FreeBSD also have -n. OpenBSD and NetBSD mv have no -n; their SYNOPSIS lists only -f, -i and -v, plus -h on NetBSD.Source: Solnix mv(1) -n; Linux mv(1) -n; FreeBSD mv(1) -n; OpenBSD mv(1) SYNOPSIS; NetBSD mv(1) SYNOPSIS |
| all four | -f versus -i precedence | In Solnix /usr/bin/mv, -f overrides every -i wherever it appears, so mv -f -i never prompts. Linux and NetBSD say the last option wins; FreeBSD and OpenBSD say a later option overrides earlier ones. /usr/xpg4/bin/mv uses last-wins.Source: Solnix mv(1) OPTIONS /usr/bin/mv and /usr/xpg4/bin/mv; Linux mv(1) DESCRIPTION; FreeBSD mv(1) -f, -i; OpenBSD mv(1) -f, -i; NetBSD mv(1) DESCRIPTION |
| all four | -f is the default without a terminal | Solnix says -f behaviour is the default when standard input is not a terminal, so a non-interactive mv does not prompt about a write-protected target. The Linux and BSD pages do not describe this terminal check.Source: Solnix mv(1) -f; Linux mv(1) -f; FreeBSD/OpenBSD/NetBSD mv(1) DESCRIPTION (prompt when mode forbids writing) |
| FreeBSD, OpenBSD, NetBSD | cross-file-system move | When source and target are on different file systems, Solnix copies then deletes, loses hard links to other files, and tries to keep owner, group, modes, times, ACLs and extended attributes. If it cannot preserve the owner or group, it clears S_ISUID and S_ISGID on the target. The BSD pages give an rm/cp/rm equivalent and mention no ACLs or extended attributes. Source: Solnix mv(1) DESCRIPTION; FreeBSD mv(1) DESCRIPTION; OpenBSD mv(1) DESCRIPTION; NetBSD mv(1) DESCRIPTION |
| FreeBSD, OpenBSD, NetBSD | affirmative answer to a prompt | Solnix accepts as affirmative any response matching the yesexpr keyword of the LC_MESSAGES locale. FreeBSD accepts a response beginning with y or Y. OpenBSD and NetBSD accept a response beginning with y. Source: Solnix mv(1) ENVIRONMENT VARIABLES; FreeBSD mv(1) -i; OpenBSD mv(1) -i; NetBSD mv(1) -i |
| Linux | environment variables | Solnix mv reads LANG, LC_ALL, LC_COLLATE, LC_CTYPE, LC_MESSAGES and NLSPATH. Linux mv also uses SIMPLE_BACKUP_SUFFIX and VERSION_CONTROL for backups, which Solnix mv does not support. Source: Solnix mv(1) ENVIRONMENT VARIABLES; Linux mv(1) DESCRIPTION (backup suffix and version control) |
| OpenBSD | mismatched file types | OpenBSD skips a source with an error when the destination is a non-empty directory or the file types do not match, and it documents partial moves with several sources. The Solnix page does not describe this. Source: OpenBSD mv(1) DESCRIPTION, CAVEATS; Solnix mv(1) DESCRIPTION |
| all four | - as a synonym for -- | Solnix mv accepts a lone - as a synonym for -- as a BSD migration aid, and the page says this might disappear in a future release. The other pages do not document it. Source: Solnix mv(1) NOTES; Linux/FreeBSD/OpenBSD/NetBSD mv(1) (not documented) |
Standards
- POSIX: mv is a POSIX.1-2024 utility.
- Solnix: Interface Stability: Committed.
- FreeBSD: The mv utility is expected to be IEEE Std 1003.2 (“POSIX.2”) compatible. The
-h,-n, and-voptions are non-standard. - OpenBSD: The mv utility is compliant with the IEEE Std 1003.1-2008 (“POSIX.1”) specification. The flag
-vis an extension to that specification. - NetBSD: The mv utility is expected to be IEEE Std 1003.2 (“POSIX.2”) compatible. The
-hand-voptions are extensions to IEEE Std 1003.2 (“POSIX.2”).
Writing portable scripts
- Use only
-fand-i, and do not combine them. Solnix/usr/bin/mv,/usr/xpg4/bin/mvand the other systems resolve conflicting options differently. - Avoid
-v,-n,-T,-tand-hin portable scripts. Each is missing on at least one system or means something different. - Put -- before file names that may begin with a dash. Do not rely on a lone - as a synonym; only Solnix documents it.
Every difference here is taken from the manual pages linked above: Solnix's published page, Linux (man-pages and the GNU and util-linux manuals), FreeBSD, OpenBSD and NetBSD. Each row names its source. Where a manual is silent, this page is too. Compiled 2026-10-26. Found a mistake? Mail hackers@lists.solnix.io.