-
Notifications
You must be signed in to change notification settings - Fork 4
CLI Machines Files Duplicate
Copies a file beside itself, naming the copy the way the window names it.
ed machines files duplicate <machine> <path> [--json]
| Name | Type / values | Default | What it does |
|---|---|---|---|
machine |
machine name, SSH alias, id or unambiguous prefix | required | Which machine. |
path |
remote path | required | What to duplicate. |
--json |
flag | off | Emit JSON on stdout. |
{
"machine": "Asus TUF 7",
"path": "/home/pulkit/report.txt",
"to": "/home/pulkit/report copy.txt"
}ed machines files duplicate tuf /home/pulkit/report.txt
ed machines files duplicate tuf /srv/app/config
ed machines files duplicate tuf /home/pulkit/report.txt --json
The name is worked out on the machine: the extension is kept, copy is added
to the stem, and if that is taken the number climbs, so report.txt gives
report copy.txt, then report copy 2.txt, then report copy 3.txt.
Duplicating twice never overwrites the first copy. The copy itself is cp -R,
so a directory duplicates whole, and the cap is 300 seconds.
One case differs from the app. A name that is nothing but an extension, such as
.bashrc, has an empty stem on the machine's arithmetic, so the CLI produces
copy.bashrc with a leading space where the window produces .bashrc copy.
A failure exits 1 and hands back what the machine printed:
$ ed machines files duplicate tuf /etc/hosts
error: could not duplicate /etc/hosts on Asus TUF 7
hint: cp: cannot create regular file '/etc/hosts copy': Permission denied
-
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