LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   rm-rf?? (https://www.linuxquestions.org/questions/linux-newbie-8/rm-rf-254346/)

icanspellnew 11-13-2004 10:05 AM

rm-rf??
 
is "rm-rf" the same as formatting?? because i need to completley format the hard drive, and be able to just run MS-DOS wen i turn on the computer

thanks

david_ross 11-13-2004 10:11 AM

No, it will just recursively delete files. To format a disk you should use mkfs.

amfoster 11-13-2004 02:39 PM

There is no command to format a hard drive. They are formatted by the manufacturer. rm -fr / simply removes all the pointers to the data on the drive. The data is still there until the data blocks are re-written to. mkfs, mkfs.ext2, mkfs.ext etc will install a new file system. That is what you are probably looking for.

Even in Windoze, when it says "Formatting C drive" is not actually reformatting the drive. A low level format takes a very very long time and should never be done.

You can put a file system on, and you can tune a disk drive with hdparm. If you are interested in completely wiping the data off the drive, just cat /dev/zero > /dev/hda (substitute the drive device if it is hdb or hdc or sda etc.

karlan 11-13-2004 04:11 PM

try
Code:

cfdisk /dev/hda
or if you have something to hide
Code:

shred /dev/hda


All times are GMT -5. The time now is 06:45 PM.