Ls command

Using the file naming convention that / separates folder names from their contents, returns a list of the files and folders in a given folder. If no folder name is given, lists all files at the top level.

The --long option produces very wide multi-column output showing the upload date/time, file size, file id, whether it is an uploaded file or the hiding of a file, and the file name. Folders don’t really exist in B2, so folders are shown with - in each of the fields other than the name.

The --json option produces machine-readable output similar to the server api response format.

The --versions option shows all versions of each file, not just the most recent.

The --recursive option will descend into folders, and will show only files, not folders.

The --replication option adds replication status

Requires capability:

  • listFiles

b2 ls [-h] [--profile PROFILE] [--long] [--json] [--versions] [--recursive]
      bucketName [folderName]

Positional Arguments


Named Arguments


Default: False


Default: False


Default: False


Default: False


Default: False