# ed machines files mv

> Moves one or more paths into a directory on the machine. This is the window's cut and paste.

- Canonical URL: https://getedith.pro/docs/cli/machines-files/mv
- Updated: 2026-12-02

Moves one or more paths into a directory on the machine. This is the window's
cut and paste.

```
ed machines files mv <machine> <path>... <directory> [--dry-run] [--replace] [--yes] [--json]
```

| Name | Type / values | Default | What it does |
| --- | --- | --- | --- |
| `machine` | machine name, SSH alias, id or unambiguous prefix | required | Which machine. |
| `path...` | one or more remote paths, then the destination directory last | at least two values required | What to move, and where to. |
| `--dry-run` | flag | off | Print the exact resolved destinations without moving. |
| `--replace` | flag | off | Target an existing matching name instead of making a numbered move. |
| `--yes` | flag | off | Confirm replacements requested with `--replace`. |
| `--json` | flag | off | Emit JSON on stdout. |

```json
{
  "operation": "machines.files.move-within-machine",
  "machine": "Devbox",
  "destination": "/home/you/archive",
  "dryRun": false,
  "executed": false,
  "requiresConfirmation": true,
  "items": [{
    "source": "/home/you/old.log",
    "destination": "/home/you/archive/old.log",
    "replacesExisting": true
  }],
  "skipped": []
}
```

```
ed machines files mv devbox /home/you/old.log /home/you/archive
ed machines files mv devbox /srv/a.conf /srv/b.conf /srv/old
ed machines files mv devbox /tmp/build /srv/releases --json
```

The collision policy is identical to `cp`: matching names get a numbered target
by default, `--dry-run` prints the plan, and `--replace` needs `--yes` before it
can remove anything. A confirmed replacement first copies the source to a
unique staging area beside the target, renames the old target to a rollback
name, and then publishes the staged source. The original source is removed only
after publication succeeds. A failed publication restores the old target and
keeps the source. A batch stops at the first failed item.

Fewer than two values exits 1, a non-zero exit on the machine exits 1 with the
machine's message, and the command is capped at 300 seconds.

A move made here is not on any window's undo stack. Reverse it with another
`mv`, not with `ed machines files undo`.

## Where to go next

- [`ed machines files`](https://getedith.pro/docs/cli/machines-files), the rest of this group
- [All `ed` commands](https://getedith.pro/docs/cli)

## Get Edith

Edith is a native Mac app for macOS 14 or later on Apple silicon with 100+ extensions, the `ed` command line and an MCP server. $35 once for one Mac, plus $7 for each additional Mac, with no subscription and a 30-day refund.

- [Buy Edith](https://getedith.pro/pricing): $35 once for one Mac, plus $7 for each additional Mac
- [Download Edith](https://getedith.pro/download): the installer, or Homebrew
