Skip to content

Instantly share code, notes, and snippets.

@joostvanveen
Last active July 27, 2020 17:53
Show Gist options
  • Save joostvanveen/22b68fea4340fd1d049aa104ae635cdb to your computer and use it in GitHub Desktop.
Save joostvanveen/22b68fea4340fd1d049aa104ae635cdb to your computer and use it in GitHub Desktop.
Delete log files containing a certain string. Handy to clean up Magento reports after committing a fix.
# Delete log files containing a certain string.
# Handy to clean up Magento reports after committing a fix.
find var/report/* -exec grep -q 'A non-numeric value encountered' '{}' \; -delete
# If you ant to chcek first:
find var/report/* -exec grep -q 'A non-numeric value encountered' '{}' \; -find
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment