Skip to content
Latchkey

rclone lsd and lsf: List Remotes and Objects

rclone lsd lists directories (buckets) and rclone lsf lists files on a remote, the quickest way to confirm a remote and its credentials work.

Before a pipeline copies gigabytes, a cheap list call proves the remote is reachable and the credentials are valid. lsf gives machine-parsable output; lsd shows top-level containers.

What it does

rclone lsd lists directories (for object stores, the buckets or top-level prefixes). rclone lsf lists files in a path in a parseable format. rclone ls prints size and path. rclone size sums the objects under a path.

Common usage

Terminal
rclone lsd s3remote:                 # list buckets
rclone lsf s3remote:my-bucket/site  # list objects under a prefix
rclone size s3remote:my-bucket      # total size and object count
rclone lsf --format "ps" s3remote:my-bucket/site

Options

Command / flagWhat it does
rclone lsd <remote>:List directories / buckets
rclone lsf <remote>:pathList files, one per line
--format "ps"lsf columns: p=path, s=size, t=modtime, h=hash
-R / --recursiveRecurse into subdirectories
--max-depth NLimit recursion depth

In CI

Use rclone lsd remote: as a first step to fail fast with a clear credentials error before an expensive transfer starts. rclone lsf output is stable and easy to diff, which is handy for asserting an artifact was uploaded.

Common errors in CI

"AccessDenied: Access Denied" on lsd but success on lsf of a known prefix usually means the role can read objects but lacks s3:ListAllMyBuckets; list a specific bucket instead. "NoSuchBucket" means the bucket name or region is wrong. "SignatureDoesNotMatch" points at a wrong secret key or, for S3-compatible stores, a wrong region or endpoint.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →