Simple Perl Script to remove folders in MAX OSX
Posted on 2013-06-27
I need to do the following in a MAC terminal over and over as part of testing and want to include it in a .pl script:
#Remove Existing MySQL
sudo rm "/usr/local/mysql";
sudo rm -rf "/usr/local/mysql*";
sudo rm -rf "/Library/StartupItems/MySQLCOM";
sudo rm -rf "/Library/PreferencePanes/My*";
#sudo nano /etc/hostconfig EDIT the MySQL bottom line out.
rm -rf "~/Library/PreferencePanes/My*";
sudo rm -rf "/Library/Receipts/mysql*";
sudo rm -rf "/Library/Receipts/MySQL*";
sudo rm -rf "/private/var/db/receipts/*mysql*";
#Removed Existing MySQL
How can I acheive that? I tried with the syntax above, but it is obviously wrong.