openfilesquery create

Prev Next

This command creates a query to search for open files under a certain path.

Usage

openfilesquery create --path-prefix PATH
                      --protocol SMB
                      [--tenant-id ID]
                      [--return-only-locked-files]
                      [--name NAME]

Required Parameters

--path-prefix PATH

The path to the directory to search for open files. The path is relative to the tenant.

The path can include no more than 64 characters.

--protocol SMB

The protocol used to open files. The only supported value is SMB.

Options

--tenant-id ID

The ID of the tenant where the path specified on the --path-prefix option resides.

If not specified, the default tenant is used.

--return-only-locked-files

If this option is included, the query returns only files that have byte-range locks on them.

By default, all open files are returned.

--name NAME

A name for the query.

Example

To create a query named SMB-Open-Query-01 to search for open files within the /SMB-01 directory:

vcli: admin> openfilesquery create --name SMB-Open-Query-01 --path-prefix /SMB-01 --protocol SMB

Waiting ...

[2025-11-03 12:58:56] Retrieving open files by prefix /SMB-01 on tenant default ... \
[2025-11-03 12:58:56] Retrieved 5 open files...
[2025-11-03 12:58:56] Retrieved 5 open files in total ... |

Completed