Skip to content

Instantly share code, notes, and snippets.

@sharshenov
Last active August 31, 2016 09:12
Show Gist options
  • Save sharshenov/98c68525a41e94573b63 to your computer and use it in GitHub Desktop.
Save sharshenov/98c68525a41e94573b63 to your computer and use it in GitHub Desktop.
Cleanup log files
#!/bin/bash
cd ~/ror
# remove temporary uploads
find ./ -path "*/uploads/tmp/*" -delete
# null logfiles
for logfile in `find ./ -type f -name "*.log"`
do
cp /dev/null $logfile
done
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment