Get File
get_fileRead files from an OpenCart VPS over SSH or DDEV, returning the head or tail of a file with an optional substring filter for inspecting logs and source code.
Instructions
Read a file from the VPS. Path is relative to OpenCart root unless absolute.
By default returns the first max_lines lines (head). Set from_end=True for the last max_lines (tail) — preferred for large logs such as error.log. Optional grep is a fixed substring filter (not a regex). With from_end=True, grep only searches the last ~50k lines so huge logs stay fast; with from_end=False, grep scans the whole file then takes the first max_lines matches (can be slow on very large files). max_lines is capped at 2000. Requires SSH or DDEV.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| grep | No | ||
| path | Yes | ||
| from_end | No | ||
| max_lines | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |