# ed machines files get

> ed machines files get in the Edith ed command line reference. Downloads one file from the machine to this Mac.

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

Downloads one file from the machine to this Mac.

```
ed machines files get <machine> <remote> [local] [--dry-run] [--replace] [--yes] [--json]
```

| Name | Type / values | Default | What it does |
| --- | --- | --- | --- |
| `machine` | machine name, SSH alias, id or unambiguous prefix | required | Which machine to read from. |
| `remote` | remote file path | required | The file to download. |
| `local` | local path, `~` expanded | the remote file's name, in the working directory | Where to write it. |
| `--dry-run` | flag | off | Print the exact local destination without downloading. |
| `--replace` | flag | off | Target an existing file instead of choosing a numbered name. |
| `--yes` | flag | off | Confirm replacement requested with `--replace`. |
| `--json` | flag | off | Emit JSON on stdout. |

```json
{
  "operation": "machines.files.download",
  "sourceMachine": "Devbox",
  "destinationMachine": null,
  "destination": "/Users/you",
  "dryRun": false,
  "executed": true,
  "requiresConfirmation": false,
  "items": [{
    "source": "/etc/os-release",
    "destination": "/Users/you/os-release 2",
    "replacesExisting": false
  }],
  "skipped": [],
  "completed": [{
    "source": "/etc/os-release",
    "destination": "/Users/you/os-release 2",
    "replacesExisting": false
  }],
  "failures": []
}
```

```
ed machines files get devbox /etc/os-release
ed machines files get devbox /var/log/syslog ~/Desktop/syslog.txt
ed machines files get devbox /etc/hosts --json
```

The destination directory is listed before the transfer. An existing name is
kept by adding ` 2`, then ` 3`, while preserving the extension. `--dry-run`
prints that resolved path. `--replace` previews a matching target and changes
nothing until `--yes` is also present.

The remote file first lands in an isolated staging directory, then a complete
copy is staged beside the local destination. A confirmed file replacement is
published atomically. Directories are not accepted as download sources or
replacement targets. A failed download or publication preserves the old
destination and removes its new staging data.

The human output reports the resolved source and destination:

```
$ ed machines files get devbox /etc/os-release
downloaded 1 item(s)
  /etc/os-release -> /Users/you/os-release 2
```

A remote path that does not exist, or one `cat` refuses such as a directory,
exits 1, and the half-written staging file is removed rather than left looking
complete:

```
$ ed machines files get devbox /etc/shadow
error: download failed: cat: /etc/shadow: Permission denied
```

## 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
