Command mv
Move or rename one regular file.
Synopsis
mv source destinationOrdinary invocation: foreground child, PID 3; the shell waits. Not an allowed pipe producer.
Parameters
| Parameter | Meaning |
|---|---|
source | Existing regular file on a writable volume. |
destination | File path or an existing directory. |
Description
Within one volume, changes the name and parent of the source inode in one metadata commit. Its data extent and inode index remain the same. An existing target file is replaced; identical source and target resolve to a no-op.
Across volumes, completes a verified copy first, then deletes the source. If source deletion fails after the copy, both copies can remain. This is not an atomic operation across two devices.
Moving from the boot ROM is rejected because removal of the source is not allowed; use CP to extract ROM files.
Examples
mv draft.txt final.txt
mv final.txt workLimits and side effects
- Regular files only; no moving directory trees, wildcard moves or overwrite confirmation. On the standard ROM-plus-one-data-cartridge setup, only the data cartridge is writable.
Status and diagnostics
Success is status 0. Relevant status codes: 1, 2, 3, 4, 5, 6, 7, 8, 9, 14, 15, 18. See the diagnostic reference.
See also
cp · rm · mkdir · Shell syntax