Forked from joostvanveen/delete_files_continaing_a_string.sh
Created
April 1, 2020 04:31
-
-
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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