https://docs.nextcloud.com/server/11.0/admin_manual/configuration_server/occ_command.html#file-operations
The occ files:scan command listed in the docs above
occ files:scan