---
title: "pols cp"
description: "Copy a file between this machine and a sandbox"
---

<!-- Generated by scripts/reference.mjs from the pols CLI's --help. Do not edit; run `npm run reference:sync`. -->

Copy one file. Exactly one side is SANDBOX:/absolute/path; the other is a
local path, or - for stdin/stdout.

## Usage

```text
pols cp SRC DST [flags]
```

## Examples

```sh
pols cp ./app.tar.gz web:/home/user/app.tar.gz
pols cp web:/var/log/syslog -
pols cp --root --mode 0755 ./setup.sh web:/usr/local/bin/setup
```

## Flags

```text
-h, --help          help for cp
    --mode string   permission bits of the uploaded file, like 0755 (default 0644)
    --root          make the uploaded file owned by root
```

The [global flags](/reference/cli/#global-flags) work with this command too.
