- #!/bin/sh
- # For Drupal 7
- # Generate a list of files that are present in the database,
- # but not physically present in the filesystem.
- if [ "$(basename $(pwd))" != "files" ]; then
- echo "Change into the files/ directory of your drupal site and try again."
- exit
- fi
- for f in $(
- echo "SELECT uri FROM file_managed" |
- drush sql-cli |
- sed -n -e 's/public:\/\/\(.*\)/\1/p'
- ); do
- test -f $f || echo $f
- done