Last active
August 29, 2015 14:27
-
-
Save Sydney-o9/1f06281aca976e11d580 to your computer and use it in GitHub Desktop.
(Re)-package CentOS 6.6 Box
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
#!/usr/bin/env bash | |
echo "1. Yum Cleaning" | |
sudo yum clean all | |
echo "2. Clean /tmp folder" | |
sudo rm -rf /tmp/* | |
echo "3. Removing log files" | |
sudo rm -f /var/log/wtmp /var/log/btmp | |
echo "4. Compressing disk. (writng zeroes to all empty space on the volume)" | |
sudo dd if=/dev/zero of=/EMPTY bs=1M | |
sudo rm -f /EMPTY | |
echo "5. Removing History" | |
cat /dev/null > ~/.bash_history && history -c | |
echo "6. Shutting Down Machine Now" | |
sudo shutdown -h now |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment