-
Notifications
You must be signed in to change notification settings - Fork 4
CLI Machines Files Cp
Copies one or more paths into a directory on the machine. This is the window's copy and paste.
ed machines files cp <machine> <path>... <directory> [--json]
| Name | Type / values | Default | What it does |
|---|---|---|---|
machine |
machine name, SSH alias, id or unambiguous prefix | required | Which machine. |
path... |
one or more remote paths, then the destination directory last | at least two values required | What to copy, and where to. |
--json |
flag | off | Emit JSON on stdout. |
{
"copied": [
"/home/pulkit/notes.md",
"/home/pulkit/deploy.sh"
],
"done": true,
"into": "/home/pulkit/backup",
"machine": "Asus TUF 7"
}ed machines files cp tuf /home/pulkit/notes.md /home/pulkit/backup
ed machines files cp tuf /srv/a.conf /srv/b.conf /srv/keep
ed machines files cp tuf /var/log/syslog /tmp --json
The last value is always the destination, like the shell tool this mirrors, and
the rest are sources. Fewer than two values exits 1 with give at least one source and a destination directory.
What runs is cp -a, so a directory is copied whole and modes, ownership where
the account is allowed to set it, and timestamps are preserved. The destination
is not checked for being a directory: with exactly one source and a destination
that does not exist, this copies the source to that name, which is cp
behaviour rather than a special case.
The command is capped at 300 seconds. Without --json the output is a single
line saying what was done, copied 2 into /home/pulkit/backup. A non-zero exit
on the machine exits 1 with that same description and whatever the machine
printed:
$ ed machines files cp tuf /srv/a.conf /srv/locked
error: copied 1 into /srv/locked failed on Asus TUF 7: cp: cannot create regular file '/srv/locked/a.conf': Permission denied
done is true in every JSON document this prints, because a failure never
gets that far; it is the field to assert on rather than to branch on.
-
ed machines files, the rest of this group - All
edcommands
Auto-generated from docs/, edit the docs in the repo, not the wiki.
CLI reference
Companion
- Deploy
- Concepts
- Concepts Memory
- Concepts Ingestion
- Concepts Search
- Concepts Chat
- Concepts Learning
- Concepts Brain
- Concepts Friend
- Hosts
- Stack
- Status
- Doctor
- Search
- Index
- Ingest
- Episodes
- Sync
- Observations
- Reflect
- Beliefs
- Ask
- Extract
- Claims
- Corroborate
- Runs
- Chat
- Conversations
- Forget
- Export
- Import
- Erase
- Wipe
- Episode
- Nightly
- Reason
- Personas
- Council
- Lenses
- Core
- Why
- Hypotheses
- Predictions
- Commitments
- Discrepancies
- Calibration
- Inquire
- Entities
- Eval
- Standup
- Machines
- Baselines
- Connectors
- Facts
- Correct
- Weekly
- Db
Guides