Is there a way to run a script on a Mac that literally will do
( sudo rm -rf / )?
I need to schedule a complete wipe of my hard drive on next Friday at 6PM. I'm not very familiar with scripts so there's no clear answer for me. Can I run a script that doesn't involve me to grant the sudo password? I do have my root user password.
Best Answer
Just create a launch daemon with
Open an editor:
and edit in the following content :
Load the launch daemon with:
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!