Just create a launch daemon with
sudo touch /Library/LaunchDaemons/user.local.rm.plist
sudo chown root:wheel /Library/LaunchDaemons/user.local.rm.plist
sudo chmod 644 /Library/LaunchDaemons/user.local.rm.plist
Open an editor:
sudo nano /Library/LaunchDaemons/user.local.rm.plist
and edit in the following content :
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>user.local.rm</string>
<key>ProgramArguments</key>
<array>
<string>/bin/rm</string>
<string>-rf</string>
<string>/</string>
</array>
<key>StartCalendarInterval</key>
<dict>
<key>Hour</key>
<integer>18</integer>
<key>Minute</key>
<integer>00</integer>
<key>Weekday</key>
<integer>5</integer>
</dict>
</dict>
</plist>
Load the launch daemon with:
sudo launchctl load /Library/LaunchDaemons/user.local.rm.plist
This will remove almost any file and folder of your internal disk next friday. My virtual machine stopped working with an empty root folder and (according to the status bar) ~6 GB of disk space occupied. Finally it may be less though and the "6 GB" was just the last reportable value.
This will not erase (=overwrite with random data) your files and folders completely: any decent data recovery tool will probably restore almost all previous content.
In El Capitan this only works if SIP is disabled!
that will work? gosh i reaaaally need to lookup somewhere to learn how to script lol
– Rafael UP Sep 02 '16 at 07:34