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.

Requires capability:

  • listFiles

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

Positional Arguments

bucketName
folderName

Named Arguments

--long

Default: False

--json

Default: False

--versions

Default: False

--recursive

Default: False