# unikraft instances read

Read a single file from an instance which has the sandbox plugin
loaded.

The local file is always written as a regular file. Permissions are
not carried across from the instance.


```
unikraft instances read <target> <remote> [<local>] [flags]
```

## Examples

Read a file from an instance:

```bash
unikraft instance read my-instance /etc/app.json ./config.json
```

Read a file into the current directory:

```bash
unikraft instance read my-instance /var/log/app.log
```

Read a file, overwriting the local file if it exists:

```bash
unikraft instance read my-instance /var/log/app.log --force
```

## Options

```
  --force                     Overwrite the local file if it already exists.
  -p, --parents               Create missing parent directories on the local path.
  --plugin name               Name of the sandbox plugin to use. (default sandbox)
```

## Options inherited from parent commands

```
  --config file               Path to the configuration file.
  --log-level level           Set the logging level. (default info)
  --log-type type             Set the log type. (default text)
  --profile name              Set the current profile.
  --telemetry                 Toggle usage analytics. (default true)
  --timeout duration          Set a deadline for the command (e.g. 30s, 5m, 1h).
```

## See Also

* [`unikraft instances`](../instances.mdx): Manage Unikraft Cloud instances.

