truncate ~/www/*/log/*.log
Even easier, ask cron to do it for me every night:
4 22 * * * * truncate -s 0k ~/www/*/log/*.log
11397 users tagging and storing useful source code snippets
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
truncate ~/www/*/log/*.log
4 22 * * * * truncate -s 0k ~/www/*/log/*.log
You need to create an account or log in to post comments to this site.
What about race conditions? Does it risk making the log file inconsistent for automatic parsing, etc.?