ssh_file_list
List remote directory entries with size, mode, owner, and modification time. Get clear feedback on access-denied or truncated listings, with recursive and pattern-filter options.
Instructions
Lists a directory on a server: every entry with its size, mode, owner and modification time, as fields. A directory it was not allowed to enter is named rather than left out, and a listing cut short by the output limit says so. To see what is inside a file, use ssh_file_read.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Directory to list. | |
| sudo | No | List as root, for directories the profile user cannot open. Default: false | |
| pattern | No | Glob matched on the machine: "*.conf". Without it every entry comes back. | |
| profile | Yes | Machine name. | |
| recursive | No | Descend into subdirectories. A deep tree is cut at the output limit and says so. Default: false |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | ||
| legend | No | What the words in this answer mean. A key names the field before the value — "state=limited", "jobs[].state=lost" — and only the values this answer actually used are listed. | |
| entries | No | ||
| truncated | No | The output limit cut the answer: the directory holds more than entries lists. | |
| unreadable | No | Directories nobody was allowed to enter. Their contents are missing from entries, and a list short by the one that mattered looks complete. |