This script aims to address the error that often appear when running Drupal cron jobs, for temporary files that have an entry in the database but not actually existing in the file system:
[error] Could not delete temporary file "public://example_file.pdf" during garbage collection
It can be run to get a count of the files:
drush scr /path/to/remove-missing-files.php