Skip to content

Instantly share code, notes, and snippets.

@cfeduke
Created January 7, 2014 15:43
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 cfeduke/8301231 to your computer and use it in GitHub Desktop.
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.
#!/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