Skip to main content
Guide

Transfer files

Move data into and out of a sandbox without rebuilding the disk image. Use the portal to browse and download, or use CLI and SDK calls for write access.

Write and read a file

CLI/SDK only for writes

The portal Files view is read-only. Use the CLI or SDK to write files, then use the portal to browse, preview, or download them.

  1. Open the sandbox from Sandbox groups > your group > Sandboxes.
  2. Go to the Files view.
  3. Browse to the directory that contains the file.
printf 'Hello from the CLI!' > aca-sample-hello.txt

aca sandbox fs write -l name=demo-files \
--path /tmp/hello.txt \
--file aca-sample-hello.txt

aca sandbox fs cat -l name=demo-files --path /tmp/hello.txt

Inspect and list files

Use metadata and directory listing calls when an agent writes output to a path you need to collect.

  1. Open the sandbox, then select Files.
  2. Select a folder to open it.
  3. Review the file names shown in the list.
aca sandbox fs stat -l name=demo-files --path /tmp/hello.txt
aca sandbox fs ls -l name=demo-files --path /tmp

Create and delete paths

CLI/SDK only

The portal file explorer does not create, upload, or delete files. Use the interactive shell, CLI, or SDK when you need to change the sandbox file system.

aca sandbox fs mkdir -l name=demo-files --path /tmp/demo-dir
aca sandbox fs rm -l name=demo-files --path /tmp/hello.txt
aca sandbox fs rm -l name=demo-files --path /tmp/demo-dir --recursive