Skip to main content
The cockroach userfile list lists the files stored in the which match the , using a SQL connection. If no pattern is provided, all files in the specified (or default, if unspecified) user scoped file storage will be listed.

Required privileges

The user must have the CREATE on the target database. CockroachDB will proactively grant the user GRANT, SELECT, INSERT, DROP, DELETE on the metadata and file tables. A user can only view files in their own user-scoped storage, which is accessed through the used during the upload. CockroachDB will revoke all access from every other user in the cluster except users in the admin role.

Synopsis

View files:
View help:

Flags

Examples

List all files in the default storage

If the file or directory is not specified, all files in the default user-scoped storage (userfile://defaultdb.public.userfiles_$user/) will be listed:

List a specific file

To list all files in a specified directory:

List files that match the provided pattern

To list all files that match a pattern, use *:

List files from a non-default userfile URI

If you (e.g., userfile://testdb.public.uploads):
Use the same URI to view it:

See also