Created
January 7, 2014 15:43
-
-
Save cfeduke/8301231 to your computer and use it in GitHub Desktop.
Clears the log file drive in preparation to create an AMI. Place in /root.
This file contains 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
#!/bin/sh | |
LOG_DIR=/var/log/trafficland | |
find $LOG_DIR -type d -print0 | while IFS= read -r -d '' dir | |
do | |
rm $dir/*.log > /dev/null 2>&1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment