Mac is this the right command?

Mindcrime13

macrumors member
Original poster
Jun 12, 2007
82
0
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?

thanks
 

xUKHCx

Administrator emeritus
Jan 15, 2006
12,045
6
The Kop
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.
 

Mindcrime13

macrumors member
Original poster
Jun 12, 2007
82
0
cuz theres some info in my computer that i really dont want anyone to or try see or to get with a recovery tool
 

Mindcrime13

macrumors member
Original poster
Jun 12, 2007
82
0
is there something similar like that but to apply it in a external hard drive?
 

xUKHCx

Administrator emeritus
Jan 15, 2006
12,045
6
The Kop
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.
 

xUKHCx

Administrator emeritus
Jan 15, 2006
12,045
6
The Kop
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.
 

mkrishnan

Moderator emeritus
Jan 9, 2004
29,641
12
Grand Rapids, MI, USA


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.
 

Mindcrime13

macrumors member
Original poster
Jun 12, 2007
82
0
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,
 

SilentPanda

Moderator emeritus
Oct 8, 2002
9,812
28
The Bamboo Forest
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.