Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 11-13-2004, 10:05 AM   #1
LQ Newbie
Registered: Jul 2004
Posts: 29

Rep: Reputation: 15

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

Old 11-13-2004, 10:11 AM   #2
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 68
No, it will just recursively delete files. To format a disk you should use mkfs.
Old 11-13-2004, 02:39 PM   #3
Registered: Aug 2004
Distribution: debian, SuSE
Posts: 365

Rep: Reputation: 36
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.
Old 11-13-2004, 04:11 PM   #4
Registered: Aug 2003
Location: San Francisco, California
Distribution: Slackware
Posts: 158

Rep: Reputation: 30
cfdisk /dev/hda
or if you have something to hide
shred /dev/hda


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:16 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration