Skip to content

Instantly share code, notes, and snippets.

@francisoud
Last active May 3, 2016 07:01
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 francisoud/ad295f46812ec442070fbf417e54ea12 to your computer and use it in GitHub Desktop.
Save francisoud/ad295f46812ec442070fbf417e54ea12 to your computer and use it in GitHub Desktop.
Script to clean up /tmp dir from files created during various jenkins builds
#!/bin/bash
# see ctonrtab -e
# At 02:00 on Mon.
# 0 2 * * 1 /root/cleanup-tmp.sh >> /tmp/crontab/cleanup-tmp.log 2>&1
echo '-------- /root/cleanup-tmp.sh ---------'
date
# cleanup /tmp files and directories
rm -vfr /tmp/log* /tmp/*log /tmp/*.sh /tmp/RackMultipart* /tmp/npm-* /tmp/native-platform* /tmp/phantomjs* /tmp/sonar-* /tmp/*.css
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment