> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cloud.red/llms.txt
> Use this file to discover all available pages before exploring further.

# File Operations

> Common push and pull patterns for devices and device groups.

## Push a File to a Device

```shell theme={null}
crcli devices push <device> ./bigip.conf
```

Specify a remote destination path with a colon:

```shell theme={null}
crcli devices push <device> ./bigip.conf:/config/bigip.conf
```

## Pull a File from a Device

```shell theme={null}
# Current directory
crcli devices pull <device> /config/bigip.conf

# Specific output directory
crcli devices pull <device> /config/bigip.conf -o ./configs/
```

## Pull Multiple Files at Once

```shell theme={null}
crcli devices pull <device> /config/bigip.conf /config/bigip_base.conf -o ./configs/
```

## Push to Every Device in a Group

```shell theme={null}
crcli devicegroups push prod-ha ./bigip.conf
```

Push to multiple groups at once:

```shell theme={null}
crcli devicegroups push prod-ha dr-ha ./bigip.conf
```

## Pull from Every Device in a Group

Files are automatically named `<hostname>_<filename>` to avoid collisions:

```shell theme={null}
crcli devicegroups pull prod-ha /config/bigip.conf -o ./configs/
```

Result:

```
./configs/
  bigip-prod-01_bigip.conf
  bigip-prod-02_bigip.conf
```

## Collect Configs from the Entire Fleet

```shell theme={null}
for group in $(crcli devicegroups list -O json | jq -r '.[].id'); do
  crcli devicegroups pull "$group" /config/bigip.conf -o ./configs/
done
```

Or with Claude:

```text theme={null}
Pull /config/bigip.conf from every device in every device group
and save to ./configs/
```
