LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


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

Rep: Reputation: 15
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
 
Old 11-13-2004, 10:11 AM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
No, it will just recursively delete files. To format a disk you should use mkfs.
 
Old 11-13-2004, 02:39 PM   #3
amfoster
Member
 
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
karlan
Member
 
Registered: Aug 2003
Location: San Francisco, California
Distribution: Slackware
Posts: 158

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


Reply



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



LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

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