Inspect files and folders
Command overview
Section titled “Command overview”connect list [flags] source_patterns...
Lists files across local disks, SFTP, S3, GCS, Azure, and aliases. Accepts simple paths, globs, or regex selectors.
Required arguments
Section titled “Required arguments”source_patterns...— one or more directories, objects, or patterns. Each argument is evaluated independently.
Output controls
Section titled “Output controls”-l, --long— long format with permissions, owner, size, timestamp.-h, --human-readable— display sizes using KB/MB/GB units.--json— emit JSON objects per entry.--table— pretty-print a table.--tree— show a tree view (combine with-Rfor recursion).
Filters and sorting
Section titled “Filters and sorting”-r, --recursive— descend into subdirectories.-a, --all— include hidden files.--min-size,--max-size— filter by size (50M,1G, …).--newer-than,--older-than— filter by modification date (YYYY-MM-DD).--type— limit tofile,dir, orall.--sort-time,-S, --sort-size,-R, --reverse— ordering controls.
Performance and connection flags
Section titled “Performance and connection flags”-p, --parallel— number of concurrent listing workers.--timeout— network timeout in seconds (default30).--key,--src-key— SSH key paths for SFTP endpoints referenced in patterns.--resolve-owner-names— best-effort username/group lookup via SSH.--sftp-max-conn,--sftp-idle-timeout,--sftp-pool-disable— pool tuning for repeated SFTP listings.
- Local files without wildcards are stat’ed immediately, making mixed local/remote listings faster.
- Quote shell patterns (
"*.log") to prevent the shell from expanding them before Connect sees them. - Prefix regex selectors with
regex:to use RE2 expressions against filenames.
Examples
Section titled “Examples”# Inspect a remote folder in long format$ connect ls -l sftp://ops:pass@10.0.0.5/logs/
# Use JSON for automation$ connect ls --json /data/*.zip > listing.json
# Recursively list S3 with a size filter$ connect ls -R --min-size 500M s3://analytics-bucket/monthly/
# Display as a tree without leaving the terminal$ connect ls --tree -R @warehouse/raw/
# Use regex to find generated reports$ connect ls /exports/regex:^report_[0-9]{8}\.csv$