Skip to content

Instantly share code, notes, and snippets.

@ipoval
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ipoval/92812bde10c80adbd60f to your computer and use it in GitHub Desktop.
Save ipoval/92812bde10c80adbd60f to your computer and use it in GitHub Desktop.
find_unused_images.sh
# ! dynamically generated image names exist
# ! watch nginx logs for image requests to find unused images
find ./app/assets/images/ -type f -exec basename {} \; |
while read line; do $(grep -r $line ./app/views/ >/dev/null) ||
echo $line; done > ~/.Trash/res.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment