Created
December 6, 2013 10:21
-
-
Save jlecour/7821571 to your computer and use it in GitHub Desktop.
A small shell script to remove useless logs (other environments than development) and truncate all other log files
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 | |
for file in `ls ~/Projects/*/log/*_{production,staging,sandbox}.log`; do | |
rm $file | |
echo "remove $file" | |
done | |
for file in `ls ~/Projects/*/log/*.log`; do | |
echo '' > $file | |
echo "truncated $file" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment