-
Notifications
You must be signed in to change notification settings - Fork 4
CLI Machines Files Search
Finds files by name under a directory. This is the window's search field.
ed machines files search <machine> <path> <query> [--limit <n>] [--json]
| Name | Type / values | Default | What it does |
|---|---|---|---|
machine |
machine name, SSH alias, id or unambiguous prefix | required | Which machine. |
path |
remote directory | required | Where to search, recursively. |
query |
text, matched anywhere in the file name | required | What to look for. |
--limit |
integer greater than zero | 300 |
Stop after this many matches. |
--json |
flag | off | Emit JSON on stdout. |
[
"/var/log/nginx/access.log",
"/var/log/nginx/error.log",
"/var/log/syslog"
]ed machines files search tuf /var/log nginx
ed machines files search tuf /srv .env --limit 20
ed machines files search tuf /home/pulkit report --json
What runs is find <path> -iname '*<query>*' -not -path '*/.git/*' | head,
capped at 120 seconds. Matching is case-insensitive and against the name only,
never the contents, and .git directories are skipped so a search under a
source tree is not drowned in objects. Because the text goes to -iname as a
glob, a * or ? inside it is honoured rather than escaped.
find's own errors are discarded, which makes this quiet in a useful way and
misleading in one way: directories the account cannot read are skipped instead
of failing the command, and a directory that does not exist simply matches
nothing:
$ ed machines files search tuf /var/log nothing-like-this
nothing under /var/log matches nothing-like-this
That note is on stderr and the exit code is 0. With --json the same case is an
empty array. Note that the document here is a top-level array of absolute paths,
not an object; it is the only command in this group shaped that way.
--limit is validated locally: zero or less exits 2 with
--limit must be greater than zero. Hitting the cap is silent, so a result of
exactly --limit lines means there may be more.
-
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