Skip to content

Instantly share code, notes, and snippets.

@P7h
Last active October 26, 2017 15:21
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 P7h/7bd522a67015f9da7376a1f6486a2acc to your computer and use it in GitHub Desktop.
Save P7h/7bd522a67015f9da7376a1f6486a2acc to your computer and use it in GitHub Desktop.
Replaces all levels to ERROR in all the log4j.properties files on the disk
sudo find / -type f -name "log4j.properties" -exec sed -i 's/TRACE/ERROR/g' {} +
sudo find / -type f -name "log4j.properties" -exec sed -i 's/DEBUG/ERROR/g' {} +
sudo find / -type f -name "log4j.properties" -exec sed -i 's/INFO/ERROR/g' {} +
sudo find / -type f -name "log4j.properties" -exec sed -i 's/WARN/ERROR/g' {} +
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment