mv

    mv command for MoonX.

    command-line
    moonx
    wasm
    Download zip
    Author
    Version
    0.2.8
    License
    Apache-2.0
    Last updated
    4 days ago
    Downloads
    177

    #mv

    Development candidate: cli/mv@0.2.8. Publication is separate; latest.json records the uploaded coordinates.

    Move files and directories for MoonX.

    moonx cli/mv@0.2.8 [-f|-i|-n] [-u|--update=MODE] [-b|--backup[=CONTROL]] [-S SUFFIX] [-T] [-v] SOURCE... DEST

    #Supported scope

    Rename or move into directories, with overwrite selection, update modes and backups.

    In the unpublished development candidate, numbered backups use one more than the highest existing positive, unpadded decimal version, retaining gaps and all older backups. Existing mode uses the same numbering when such a backup exists, and the simple suffix otherwise. Directory scan failures remain errors. Filesystem case/Unicode aliases count as existing backups. Numbered selections refuse a backup that appears before rename; simple suffixes still replace.

    #Options

    OptionDescription
    -f, --forceReplace without asking.
    -i, --interactiveAsk before replacing; refusal or EOF returns 1.
    -n, --no-clobberSkip existing targets successfully.
    -u, --update[=MODE]Select older (bare -u/--update), all, none or none-fail.
    -b, --backup[=CONTROL]Back up targets: none, simple, numbered or existing; bare flag selects existing.
    -S, --suffix=SUFFIXSet simple backup suffix; default ~.
    -T, --no-target-directoryTreat target as a complete path; one source only.
    -v, --verboseShow moves.
    --help / --versionShow help / package version.

    #Argument and exit-status contract

    Ordinary option/operand errors exit 1; documented capability refusals retain their own status. Option values and operands after -- remain literal during alias normalization.

    #Limitations

    • If a move fails after making a backup and restoring that backup also fails, the diagnostic includes both failures and the backup path. Inspect the reported paths before retrying; successful rollback preserves the original move error.

    • Cross-filesystem moves are unsupported.
    • Windows rejects moving symlinks/junctions and backing up destination links; explicit skip modes remain available.
    • -i/-u reject equal source/target timestamps. Same-path and same-file hard-link moves fail, except explicit skip modes.

    #Examples

    moonx cli/mv@0.2.8 old.txt new.txt moonx cli/mv@0.2.8 -n report.txt archive/ moonx cli/mv@0.2.8 --backup=simple report.txt archive/

    Source Files