Skip to content

list

List directory contents

Terminal window
conhive-agent filemanager list

Lists the files and directories within a specified path on the agent’s host machine. Requires the directory path, typically provided via a ‘—directory’ flag or argument. Supports optional flags for filtering results, such as by a regular expression (‘—regex’), limiting the number of results (‘—limit’), or showing hidden files. Output includes names, sizes, modification times, and types (file/directory).

Terminal window
conhive-agent filemanager list [flags]
Terminal window
fm list --directory /var/log --regex "\\.log$" --limit 20 # List top 20 .log files in /var/log
Terminal window
--directory string Directory to list files
-h, --help help for list
--limit int32 Maximum number of results (default 100)
--regex string Regular expression to filter files
-f, --log-format string Specify the logging format (options: console,
json) (default "text")
-l, --log-level string Define the logging level (options: trace,
debug, info, warn, error, fatal, panic)
(default "info")
-o, --log-to-file Enable logging to a file (default true)
-p, --port int32 Port to run the server on (default 5050)
-w, --workdir string Set the working directory for agent operations
(default: $HOME/.conhive)