Last active
August 29, 2015 14:11
-
-
Save fxlv/d5b2125d5604a843be5b to your computer and use it in GitHub Desktop.
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/bash | |
echo "cleaning up apt cache" | |
sudo apt-get clean | |
sudo /etc/init.d/rsyslog stop | |
echo "Removing old logs" | |
sudo find /var/log -type f -delete | |
echo "Zeroing out disk" | |
sudo dd if=/dev/zero of=/zero bs=1M | |
echo "Removing zero file" | |
sudo rm -v /zero | |
echo "Cleaning up the history" | |
cat /dev/null |sudo tee /root/.bash_history | |
cat /dev/null |sudo tee /home/vagrant/.bash_history | |
history -c |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment