Skip to content

Instantly share code, notes, and snippets.

@tapajos
Created August 15, 2012 02:21
Show Gist options
  • Save tapajos/3355004 to your computer and use it in GitHub Desktop.
Save tapajos/3355004 to your computer and use it in GitHub Desktop.
trucate logs
#!/bin/bash
cd $PROJECT_PATH
for i in $(find */log/*.log); do
echo "" > $i
done
@fnando
Copy link

fnando commented Aug 15, 2012

I actually type this everytime: find . -name '*.log' -type f -exec cp /dev/null {} \;. Same result. :)

@lunks
Copy link

lunks commented Aug 15, 2012

Thanks for the one-liner, @fnando! 7 lines, @tapajos? Really?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment