Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save phillipwilhelm/dd932d56b55be297c9eff4d0d94e6078 to your computer and use it in GitHub Desktop.
Save phillipwilhelm/dd932d56b55be297c9eff4d0d94e6078 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