View Full Version : is this the right command?

Aug 8, 2007, 10:55 AM
well, im trying some stuff in my computer and wanted to make sure of something,

sudo rm -rf / is the command in terminal that would erase my whole computer leaving only the OS right? and is that how it should be written?


Aug 8, 2007, 11:00 AM
I believe that's correct but why would you want to do that? And if so why not just format your hard drive instead?

Aug 8, 2007, 11:05 AM
That command will just hose your system. Don't run it.

sudo = basically giving it root privileges.
rm = remove
r= recursive
f = force
/ = root of the drive.

So it'll go through your harddrive deleting everything as well as anything attached to it.

Aug 8, 2007, 11:06 AM
cuz theres some info in my computer that i really dont want anyone to or try see or to get with a recovery tool

Aug 8, 2007, 11:07 AM
is there something similar like that but to apply it in a external hard drive?

Aug 8, 2007, 11:09 AM
Just open up Disk Utility in Utilities. Select the external drive and select the erase option. In there you can choose some option going all the way up to 35 passes.

If you want to do this to the internal drive you'll have to boot from the install DVD and use disk utility there.

Aug 8, 2007, 11:15 AM
and with the disk utility, theres no way no one will recover anything?

Aug 8, 2007, 11:17 AM
Well if you really want to be sure I'd melt the drives down.

With 35 passes it is pretty safe to assume that no general person can recover the files, now the NSA that is a different matter.

Aug 8, 2007, 11:23 AM

Incidentally, Disk Utility *is* secure. sudo rm -rf just deletes the file in the standard way. It's not secure from data recovery at all, any more than just dragging the file to the trash.

Aug 8, 2007, 11:27 AM
cuz theres some info in my computer that i really dont want anyone to or try see or to get with a recovery tool

You can just put it in the trash and choose secure empty trash...

Aug 8, 2007, 11:29 AM
hahah well its no NSA material LOL, but its some stuff i;ve been writing in python, and a friend of mine wants tog et it and call it his, and that freaks em out a little,

Aug 8, 2007, 11:31 AM
wow you must have pretty bad friend if you are going down this route.

Aug 8, 2007, 11:33 AM
yea its a love-hate relationship

Aug 8, 2007, 12:33 PM
In that case don't erase your whole machine. Just delete the python files and in disk utility you can choose to erase your free hard drive space. You can choose the multiple pass option. Honestly I wouldn't bother going over it more than 1 or 2 times... any more than that and your friend is probably just crazy and I would seek new friends.

Aug 8, 2007, 01:24 PM
hm i dint know that about deleting the free space! thanks, ill do that,:apple::D