# nodus cp

> Copy files to and from a running Sandbox, Workspace or Job, or download a Job output

Source: https://nodus-platform-site.pages.dev/docs/reference/cli/nodus_cp/
Build revision: 211ad9f836655b1c3a2668c4693e442471f28614

## nodus cp

Copy files to and from a running Sandbox, Workspace or Job, or download a Job output

### Synopsis

Either side is KIND/NAME:/absolute/path inside the running container; the other side is a local path. Directories copy recursively. KIND/NAME:outputs/OUTPUT downloads a declared output of a Job, verified against its SHA-256 and written atomically; KIND/NAME:outputs/ or outputs/PREFIX/ downloads every output under it into a directory, so a TrainingJob’s adapter comes down in one command.

```plaintext
nodus cp SRC DST [flags]
```

### Examples

```plaintext
  nodus cp ./data sb/dev:/workspace/data
  nodus cp ws/lab:/home/nodus/results ./results
  nodus cp job/train:outputs/model ./model
  nodus cp trainingjob/tune:outputs/ ./outputs
  nodus cp job/ddp:outputs/metrics . --rank 1
```

### Options

```plaintext
  -h, --help          help for cp
      --index int     Job index (Indexed Jobs) (default -1)
      --rank string   Gang member rank (default 0)
```

### Options inherited from parent commands

```plaintext
      --context string   Context from the config file to use
      --org string       Organization (selects the context for that org)
  -p, --project string   Project to work in
  -v, --verbose          Log each API request (never credentials)
```

### SEE ALSO

* [nodus](https://nodus-platform-site.pages.dev/docs/reference/cli/nodus/) - Run compute Jobs on Nodus

### Tested examples

These invocations run in CI against the CLI’s fake API.

Terminal window

```sh
nodus cp job/train:outputs/model model.bin
nodus cp job/train:outputs/model out
nodus cp want-model.bin sb/dev:/workspace/
nodus cp src sb/dev:/workspace/src
nodus cp sb/dev:/workspace back
nodus cp sb/dev:/workspace/src/a.bin single.bin
nodus cp sb/dev:/workspace/missing gone.bin
nodus cp want-model.bin sb/dev:/hostile/ok.bin
nodus cp sb/dev:/hostile got
```
