Test Disk For Mac Os X



Version history for TestDisk & PhotoRec for Mac OS X (Intel). Disk Drill makes data recovery in Mac OS X super easy. With just one click of a button, it will run through all of its scanning functions and display a list of files that can be potentially recovered. You can even preview these files so that you can determine which ones can be successfully recovered. Mac OS X Version: 7.2 Licence: Open Source Developer: CG Security Date Added: 30 Jul 19 Download TestDisk 7.2 for Windows Download Download TestDisk 7.2 for Linux Download Download TestDisk 7.2. OS X Disk Utility Terminal Hard Drive The Disk Utility application is a powerful tool for keeping the drives that are connected to your Mac happy and healthy. But there are situations in.

Changes for v7.0 Beta - v7.0

  • General Improvements
  • Various fix including security fix, thanks to
  • Coverity scan (Static Analysis of source code)
  • afl-fuzz (security-oriented fuzzer).
  • Denis Andzakovic from Security Assessment for reporting an exploitable Stack Buffer Overflow
  • TestDisk
  • Improvements
  • exFAT: better support
  • ext4: handle 64 bit blocks or 64 KiB blocksize. Fix detection and file listing
  • Bug fixes
  • Avoid erroneous error when writing 512 bytes on hard disk using 4k sector
  • FAT, NTFS: avoid NULL pointer dereference if localtime() returns NULL. Thanks to Graham Sutherland for reporting this bug.
  • PhotoRec & QPhotoRec
  • QPhotoRec is a Graphical User Interface (Qt based GUI) version of PhotoRec. More user friendly, it recognizes the same file formats.
  • PhotoRec remains recommended for advanced users, it can stop a recovery and resume it later, it recovers more fragmented files when brute-force technology is enabled and expert mode is available.
  • Improvements
  • Reduced false positives for more than 80 file formats.
  • .gif: fix filesize detection
  • .flv: add Flash filesize detection
  • .mpg: detect filesize for MPEG
  • .ra: detect filesize for RealAudio3
  • Improved algorithm to deal with data fragmentation resulting in a general speed increased
  • Speedup brute-force mode. Brute-force mode can recover more fragmented files, but it's still slow and not 100% reliable. You can enable it in PhotoRec Options menu.
  • New file formats recovered by PhotoRec:
  • .3dm: Rhino / openNURBS
  • .ari: ARRI Raw Video
  • .camrec: Camtasia Studio
  • .dad: Micae DVR
  • .dcm: Digital Imaging and Communications in Medicine (DICOM)
  • .fp12: File Maker Pro 12
  • .kra: Krita
  • .mlv: Magic Lantern Video
  • .notebook: SMART notebook
  • .ora: Mypaint
  • .red: RED2 video format
  • .rlv: Revelation password
  • .vbm: Veeam Backup Metadata
  • .woff: Web Open Font Format

Changes for v6.13 - v6.14

  • Improvements
  • testdisk /list now displays the disk model, serial number, firmware version and hpa or dco presence if detected
  • Recover WBFS (Wii Backup File System) partition
  • Make FAT RebuildBS works when there is a single FAT table
  • Interface: Display the partition table type if autodetected
  • Interface: modified warning about mismatching geometry between FAT or NTFS boot sector and HD geometry information (Debian #651756)
  • Interface: Remove 'Allow partial last cylinder' option
  • Bug fixes
  • Fix crc in EFI backup GPT
  • Rewrote how TestDisk aligns partition on cylinder or 1MB boundary. It avoids to create partition entry where the partition ends after the end of the disk.
  • PhotoRec
  • Improvements
  • Improve Olympus .orf recovery
  • Improve WP Mac/WP5/WP6 Corel Documents .wpd files recovery
  • Fix thumbs.db recovery, avoid some false positive with .doc
  • Interface: if less than 10 file families are enabled, display the results even if zero has been found yet
  • New file formats:
  • aep After Effects
  • axx AxCrypt
  • dp Designer, a Photobook Designer Software
  • lzh archive
  • mmap MindManager
  • plt Gerber Graphix Advantage
  • prproj Adobe Premiere project
  • psb Adobe Photoshop Image
  • pts PTGui, panoramic stitching software
  • qcp The QCP File Format and Media Types for Speech Data (RFC3625)
  • shn Shorten audio file
  • snt Windows Sticky Notes
  • ttd TinyTag Data
  • wallet Armory bitcoin wallet
  • wim Windows imaging (WIM) image
  • Bug fixes
  • Fix an endless loop during .caf file recovery
  • Fix tiff recovery including some raw file formats, 64-bit version wasn't affected

Changes for v6.13 Beta - v6.13

  • General Improvements
  • Fix UAC manifests for Windows, so users don't need to use right-click 'Run As Administrator'
  • TestDisk & PhotoRec are now compatible with both libewf and libewf2, the new version of a library to support the Expert Witness Compression Format (EWF).
  • TestDisk
  • Fix image creation, image.dd file wasn't created (Regression introduced in 6.12)
  • Detect Vmware VMFS partition
  • Locate lost GFS2 partition but not yet the size
  • Log HDD serial number and firmware revision
  • List NTFS Alternate Data Streams (ADS)
  • PhotoRec
  • Session recovery restarts at the previous location
  • Better MPEG recovery, there should be less concatenated videos.
  • Better JPG recovery, there should be less cases where thumbnails were recovered instead of the picture itself.
  • Handle large avi files using 'AVIX' or mov files using 64-bit chunk size.
  • Rename recovered pdf using the title (not perfect)
  • Major cleanup of PhotoRec core code
  • New file formats:
  • .caf Core Audio Format
  • .dardar3 archive
  • .ddf Didson Data File (v3 and v4)
  • .gcs GCstart (personal collections manager)
  • .gam Games Factory
  • .hdf Hierarchical Data Format 4
  • .hdr ENVI
  • .max 3ds
  • .oci OpenCanvas Image .oci
  • .par2 archive
  • .psmodel Delcam PowerSHAPE
  • .save Assassin's Creed II backup
  • .sh3d Sweet Home 3D
  • .TiVo video record
  • .vmg Nokia Text Message
  • .wpb OpenCanvas files
Test Disk For Mac Os X

Changes for v6.12 Beta - v6.12

  • Convert the directory name when it can't be created (Fix for Windows/Cygwin version)
  • Better HPA/DCO detection: handle the case where native_max is null.
  • Image Creation is now faster tahn previous version when there are bad sectors
  • List and copy files from exFAT filesystem
  • Improved NTFS undelete interface
  • PhotoRec checks for EFBIG (file too large) error when writing files. It's usefull to avoid erronous message about 'no free space available' when recovering to a FAT filesystem.
  • Recover files from exFAT unallocated space
  • Use doc/xls/ppt title to name recovered Office document, use first filename in zip archive...
  • Possibility to add your own extension/custom signature to PhotoRec
  • Generated a report.xml file using Digital Forensics XML
  • New file formats are supported:
  • .1cd Russian Finance 1C:Enterprise 8
  • .ani Windows Animated Cursor
  • .bac Bacula backup
  • .bim Broadcast Interface Module
  • .cdl/cdt/cdd Concept Draw
  • .cow Qemu image
  • .dbn DriftBox
  • .dex Dalvik
  • .dgn Bentley Systems' MicroStation
  • .dmp Oracle dump file
  • .e01,e02... Encase files
  • .emb Wilcom ES
  • .emka EMKA IOX - Pharmacology & toxicology
  • .exe 16 bits windows executable (MZ NE)
  • .freeway Freeway 5 pro
  • .gm6/gmd Game Maker
  • .gp5 Guitar Pro 5 files
  • .icc Color profiles
  • .idf MIDI Instruments Definition File
  • .it Impulse Tracker
  • .jad Java Application Descriptor
  • .jnb SigmaPlot
  • .ly LilyPond
  • .lzo Archive
  • .mdl Mathlab model
  • .mem Mnemosyne
  • .mid MIDI sound file (RIFF format)
  • .myo Mind Your Own Business
  • .nds Nintendo DS Game ROM Image
  • .nsf Lotus Notes
  • .ogm Ogg data/Theora video
  • .p65 Page Maker
  • .pbm/pgm/ppm Netpbm
  • .pgp Pretty Good Privacy
  • .psf Print Shop
  • .pzf GraphPrism 4
  • .pzh Presto
  • .qbb Quickbook
  • .qgs Quantum GIS
  • .qkt Apple QuickTake 100
  • .qpw Quattro Pro spreadsheet
  • .r3d RED camera videos
  • .rfp RoboForm
  • .sldprt SolidWorks
  • .smil Synchronized Multimedia Integration Language
  • .sparseimage Filevault
  • .sql phpMyAdmin, MySQL and postgreSQL dumps
  • .svg Scalable Vector Graphics
  • .tib Acronis
  • .tod MPEG files
  • .torrent BitTorrent files
  • .url Windows Internet Shortcut .url
  • .vb Visual Basic
  • .vdi Virtual desktop infrastructure 1.1
  • .vfb FontLab
  • .xmp Adobe's Extensible Metadata Platform
  • .xrns Extended Renoise song
  • .xoj Xournal
  • .xpi Mozilla Cross-Platform Install
  • .wdp JPEG XR
  • .wtv Windows Media Center TV

Changes for v6.11.3 - v6.12 Beta

  • General Improvements
  • fidentify, a little utility sharing PhotoRec signature database, is now build by default. It identifies the type of data contained in a file and reports the extension as seen by PhotoRec. It is similar to the Unix file command.
  • TestDisk
  • Convert the directory name when it can't be created (Fix for Windows/Cygwin version)
  • Better HPA/DCO detection: handle the case where native_max is null.
  • Image Creation is now faster when there are bad sectors
  • PhotoRec
  • PhotoRec checks for EFBIG (file too large) error when writing files. It's usefull to avoid erronous message about 'no free space available' when recovering to a FAT filesystem.
  • New file formats are supported:
  • .1cd Russian Finance 1C:Enterprise 8
  • .ani Windows Animated Cursor
  • .exe 16 bits windows executable (MZ NE)
  • .gp5 Guitar Pro 5 files
  • .idf MIDI Instruments Definition File
  • .mid MIDI sound file (RIFF format)
  • .qpw Quattro Pro spreadsheet
  • .r3d RED camera videos
  • .sldprt SolidWorks
  • .sql phpMyAdmin, MySQL and postgreSQL dumps
  • .svg Scalable Vector Graphics
  • .tod MPEG files
  • .url Windows Internet Shortcut .url
  • .vb Visual Basic

Changes for v6.10 - v6.11.3

  • General Improvements:
  • TestDisk & PhotoRec 6.11 should use less CPU.
  • TestDisk:
  • This new TestDisk version can undelete files for NTFS filesystem and recover deleted exFAT and ext4.
  • PhotoRec:
  • Performance improvement when scanning for numerous file type
  • Fix several bugs including an endless loop, several memory leaks and several out-of-bound memory access
  • New file formats are supported:
  • .abcdp Apple binary property list
  • .ahn Ahnenblatt
  • .amd AlphaCAM
  • .amt AlphaCAM
  • .apa APA Style Helper
  • .ape Monkey's Audio compressed format
  • .atd Agelong Tree Database/Abs0luteDatabase
  • .att AlphaCAM
  • .bld blender
  • .class Java Class
  • .cm Comic Life
  • .compress MS compress file (SZDD)
  • .csv Comma separated values
  • .cue Cue sheet
  • .dim SunPCI Disk Image
  • .dxf Drawing Interchange File
  • .edb Exchange Database
  • .fbk Microsoft Dynamics NAV (MS Navision)
  • .fdb Microsoft Dynamics NAV (MS Navision)
  • .flp Fruity Loop
  • .fob Microsoft Dynamics NAV (MS Navision)
  • .hds Parallels disk image
  • .ico Windows Icon
  • .jp2 sample
  • .kmy KMyMoney
  • .logic Apple Logic Studio
  • .lyx LyX
  • .m3u Moving Picture Experts Group Audio Layer 3 Uniform Resource Locator
  • .mfa The Games Factory Multimedia Fusion Files
  • .mny MS Money
  • .mxf Material Exchange Format
  • .nk2 Outlook Nickfile
  • .pcap tcpdump capture file
  • .psp Paint Shop Pro Image File
  • .pyc Python Compiled Script
  • .qbb Quickbooks
  • .qbw Quickbooks
  • .rpp Reaper Project
  • .ses Cool Edit/Adobe Audition session
  • .sp3 Sisporto SP3/SPM
  • .spf ShadowProtect
  • .sqm Windows Live Messenger Log File
  • .stu StuffIt Archive
  • .tax Turbo Tax
  • .tlx Surveillance System
  • .ttf TrueType Font
  • .tz Timezone info
  • .wnk Wink
  • .wv WavPack, Hybrid Lossless Wavefile Compressor
  • .xv XV thumbnail image

Changes for v6.10 - v6.11

  • TestDisk & PhotoRec 6.11 should use less CPU.
  • TestDisk:
  • This new TestDisk version can undelete files for NTFS filesystem and recover deleted exFAT and ext4.
  • PhotoRec:
  • Performance improvement when scanning for numerous file type
  • Fix several bugs including an endless loop, several memory leaks and several out-of-bound memory access
  • New file formats are supported:
  • .abcdp Apple binary property list
  • .ahn Ahnenblatt
  • .amd AlphaCAM
  • .amt AlphaCAM
  • .apa APA Style Helper
  • .ape Monkey's Audio compressed format
  • .atd Agelong Tree Database/Abs0luteDatabase
  • .att AlphaCAM
  • .bld blender
  • .class Java Class
  • .cm Comic Life
  • .compress MS compress file (SZDD)
  • .csv Comma separated values
  • .cue Cue sheet
  • .dim SunPCI Disk Image
  • .dxf Drawing Interchange File
  • .edb Exchange Database
  • .fbk Microsoft Dynamics NAV (MS Navision)
  • .fdb Microsoft Dynamics NAV (MS Navision)
  • .flp Fruity Loop
  • .fob Microsoft Dynamics NAV (MS Navision)
  • .hds Parallels disk image
  • .ico Windows Icon
  • .jp2 sample
  • .kmy KMyMoney
  • .logic Apple Logic Studio
  • .lyx LyX
  • .m3u Moving Picture Experts Group Audio Layer 3 Uniform Resource Locator
  • .mfa The Games Factory Multimedia Fusion Files
  • .mny MS Money
  • .mxf Material Exchange Format
  • .nk2 Outlook Nickfile
  • .pcap tcpdump capture file
  • .psp Paint Shop Pro Image File
  • .pyc Python Compiled Script
  • .qbb Quickbooks
  • .qbw Quickbooks
  • .rpp Reaper Project
  • .ses Cool Edit/Adobe Audition session
  • .sp3 Sisporto SP3/SPM
  • .spf ShadowProtect
  • .sqm Windows Live Messenger Log File
  • .stu StuffIt Archive
  • .tax Turbo Tax
  • .tlx Surveillance System
  • .ttf TrueType Font
  • .tz Timezone info
  • .wnk Wink
  • .wv WavPack, Hybrid Lossless Wavefile Compressor
  • .xv XV thumbnail image

Changes for v6.9 - v6.10

  • General Improvements
  • Report disk manufacturer and model under Windows and Linux (Only Linux was supported in 6.9)
  • Under Linux, /dev/mapper/* and /dev/md? are now listed with the harddisks.
  • Now both OS and compiler versions are recorded in the log file.
  • Testdisk is now shipped with plugins for both BartPE and WinBuilder
  • TestDisk
  • undelete files and directories for FAT filesystem,
  • undelete files for ext2 filesystem,
  • copy files from ext2/ext3 partitions. These feature was already available for FAT and NTFS.
  • PhotoRec
  • New file formats are supported:
  • adr Opera Hotlist
  • als Ableton Live Sets
  • amb Licom AlphaCAM
  • amd/amt/atd/att AlphaCAM
  • amr Adaptive Multi-Rate
  • arj Archive
  • arw Sony raw image,
  • asm Pro/ENGINEER Assembly
  • chm MS Windows HtmlHelp Data
  • dc TSCe Survey Controller DC v10.0
  • deb Debian Archive
  • drw Pro/ENGINEER Drawing
  • ds2 Digital Speech Standard v2
  • fcs Flow Cytometry Standard 3.0
  • f Fortran
  • fits NASA Flexible Image Transport System
  • frm Pro/ENGINEER Drawing Form
  • gho Ghost
  • gpg Partial support for GPG/OpenPGP file recovery
  • ics vcalendar
  • ifo DVD Video manager or title set
  • iso cd/dvd iso image (ISO0660)
  • kmy KMyMoney
  • m2ts Blu-ray MPEG-2
  • mcd VectorWorks
  • mfg Pro/ENGINEER Manufacturing
  • msf Mozilla 'mork database'
  • pfx files holding PKCS#12 keys
  • prt Pro/ENGINEER Model
  • psp Paint Shop Pro Image File
  • SQLite databases
  • stl Stereolithography CAD
  • stp Standard for the Exchange of Product model data
  • tph Pro/ENGINEER ToolPath
  • veg Sony Vegas
  • wdb Microsoft Works Database
  • wks Lotus 1-2-3
  • Load and save FileOpts settings: remember which file types to recover
  • For JPEG files, extract the time/date from Exif header and set the file time

Changes for v6.9 - v6.10 WIP

  • General Improvements
  • Report disk manufacturer and model under Windows and Linux (Only Linux was supported in 6.9)
  • Under Linux, /dev/mapper/* and /dev/md? are now listed with the harddisks.
  • Now both OS and compiler versions are recorded in the log file.
  • TestDisk
  • undelete files and directories for FAT filesystem,
  • undelete files and directories for ext2 filesystem,
  • copy files from ext2/ext3 partitions. These feature was already available for FAT and NTFS.
  • PhotoRec
  • New file formats are supported:
  • adr Opera Hotlist
  • als Ableton Live Sets
  • amb Licom AlphaCAM
  • amd/amt/atd/att AlphaCAM
  • amr Adaptive Multi-Rate
  • arj Archive
  • arw Sony raw image,
  • asm Pro/ENGINEER Assembly
  • chm MS Windows HtmlHelp Data
  • dc TSCe Survey Controller DC v10.0
  • deb Debian Archive
  • drw Pro/ENGINEER Drawing
  • ds2 Digital Speech Standard v2
  • fcs Flow Cytometry Standard 3.0
  • f Fortran
  • fits NASA Flexible Image Transport System
  • frm Pro/ENGINEER Drawing Form
  • gho Ghost
  • gpg Partial support for GPG/OpenPGP file recovery
  • ics vcalendar
  • ifo DVD Video manager or title set
  • iso cd/dvd iso image (ISO0660)
  • kmy KMyMoney
  • m2ts Blu-ray MPEG-2
  • mcd VectorWorks
  • mfg Pro/ENGINEER Manufacturing
  • msf Mozilla 'mork database'
  • pfx files holding PKCS#12 keys
  • prt Pro/ENGINEER Model
  • psp Paint Shop Pro Image File
  • SQLite databases
  • stl Stereolithography CAD
  • stp Standard for the Exchange of Product model data
  • tph Pro/ENGINEER ToolPath
  • veg Sony Vegas
  • wdb Microsoft Works Database
  • wks Lotus 1-2-3
  • Load and save FileOpts settings: remember which file types to recover
  • For JPEG files, extract the time/date from Exif header and set the file time

Changes for v6.8 - v6.9

  • TestDisk & PhotoRec 6.9 comes with numerous improvements
  • EFI GUID Partition Table is now supported. EFI GPT is used mainly on Itanium, MacBook and Mac Pro
  • Both utilities can use sudo if the user is not root, this functionnality will be enable for MacOSX at least so users won't have to go in command line. Under Linux, disk model is now displayed to help identify the media
  • Internal card readers are now better supported under Windows
  • TestDisk
  • New filesystem support have been added: encrypted LUKS, Mac HFSX, Linux raid md 1.0/1.1/1.2 (0.9 was already supported)
  • UFS, UFS2 filesystem are better identified now
  • TestDisk 6.9 handles Mac partition table partially overwritten by an Intel partition
  • It display unicode filenames correctly and can handle unicode filesname when copying files from an NTFS partition when supported by the underlying libraries. TestDisk warns if the media is in read-only instead of read-write access
  • It's now possible to copy files from a delete FAT partition found by TestDisk (already possible for NTFS) without having to rewrite the partition table. In the advanced functionality, raw partition imaging capability have been added
  • PhotoRec
  • PhotoRec 6.9 can search for lost files in ext2/ext3 unallocated space only (Was available for FAT and NTFS)
  • It has a better session support that allow a recovery to be strop and restart later. Windows forensics has been improved with the addition of Windows Enhanced MetaFile .emf (Printing), MS Windows Link .lnk, Internet Explorer index.dat (navigation history.
  • New file formats are supported: Acronis True Image .tib, AutoCAD .dwg and PowerTab .ptb, Cineon image file/SMTPE DPX .dpx, Comic Life .comicdoc, HP Photosmart Photo Printing Album .albm, KeepAssX .kdb, Maya .mb and .mp, Microsoft OneNOte .one file, Micros
  • It fixes Mac Adress Book and Outlook 64-bits .pst recovery and NTFS free space recovery

Changes for v6.7 - v6.8

  • General Improvements:
  • Partition type is autodetected.
  • TestDisk and PhotoRec can now be used under GNU screen, the screen manager with VT100/ANSI terminal emulation. Typically, a screen can be shared by an end-user under Linux, Mac or another Unix and a remote data recovery specialist connected via SSH. It's also possible to disconnect while keeping a long recovery (ie PhotoRec) session running.
  • Disk geometry under Mac has been corrected (Version 6.7 affected)
  • TestDisk:
  • HFS partition detection has been improved to avoid false positive
  • Log potential NTFS partition location from MFT & MFTMirr location while rebuilding NTFS boot sector
  • PhotoRec:
  • Some important bugfixes (false positive problem, implementation bugs) have been made in PhotoRec 6.8.
  • JPG bruteforce recovery has been improved a little bit, you can use it to recover more fragmented jpeg but it's very time consuming and not 100% reliable, so it's still disabled by default.
  • .7z, .cab, .rar and .tar recovery have been improved.
  • .dta and .spss file formats (statistical analysis file format) have been added.
Test Disk For Mac Os X

There are not many things I miss from Mac OS 9. But there’s one that was really useful: the ability to test a hard drive surface. OS 9 disk formatter (I don’t even recall it’s name) had a “Test Disk” option that would perform a surface scan of the selected hard drive. That was awsome to test for bad blocks on the drives.

Unfortunately, that’s impossible to do with Mac OS X, at least with it’s built-in software. There are some commerical applications to do that (like TechTool Pro), but I get a little pissed off when I have to spend a lot of money buying a software that does a zillion things when all I want is surface scans, and specially when I could do it with the “old” OS and not with the new powerful UNIX-based one.

Well, Linux has the badblocks command that will do just that: test the disk surface for bad blocks. It’s a simple UNIX command, so I thought there must be a port of that to OS X (and, of course, I could try to compile it in OS X as last resource). After some googling, I found out badblocks is part of the ext2fs tools. And, fortunately, Brian Bergstrand has already done the port to OS X, including a nice installer.

The installer installs all the ext2fs stuff, including an extension that will allow you to access ext2fs volumes on OS X. As always, this is a somewhat risky operation. Personally, I avoid as many extensions as I can, because they run too close to the kernel for me to feel confortable. So, if possible, install it on a secondary OS (like an utility/recover system on an exteral hard drive, or so).

Testdisk Reviews

The badblocks command will be installed in /usr/local/sbin/badblocks, and it will probably not be on your PATH, so you have to type the entire path when using, or edit your PATH environment variable.

Usage is simple. First, run the “mount” command, so that you know the device names for the drives you want to test. You can obtain something like this:

arroz% mount
/dev/disk0s3 on / (local, journaled)
devfs on /dev (local)
fdesc on /dev (union)
on /.vol
automount -nsl [142] on /Network (automounted)
automount -fstab [168] on /automount/Servers (automounted)
automount -static [168] on /automount/static (automounted)

The internal hard drive is /dev/disk0 (note that /dev/disk0 is the entire drive, /dev/disk0s3 is a single partition). Imagining you want to test the internal hard drive you would type the command (as root):

badblocks -v /dev/disk0

This would start a read-only test on the entire volume. The -v is the typical verbose setting, so you may follow what’s happening. This will take a long time, depending on the hard drive you use. For a 160 GB hard drive, it took between 2 and 3 hours in a G5 Dual 2 Ghz.

I mention this because time is an important factor when testing hard drives! You should run badblocks on a known-to-be-in-good-condition hard drive, so that you can get the feeling of how fast (or slow) badblocks is. Later, if you test a possibly failing hard drive, and badblocks progresses notably slower, it will probably mean that the hard drive is in bad condition (even if it doesn’t have badblocks).

After running the command, you may get two results: your disk has, or hasn’t badblocks! 🙂 You will see many outputs of a successful surface scan, so I leave here an example of a not-so-successful one:

/usr/local/sbin arroz$ sudo ./badblocks -v /dev/disk0
Password:
Checking blocks 0 to 156290904
Checking for bad blocks (read-only test): 120761344/156290904
120762872/156290904
120762874/156290904
done
Pass completed, 3 bad blocks found.

This is the result of a test on a 160 GB hard drive with 3 bad blocks.

After getting something like this, you may try to run badblocks again, in write mode.

Mac Os X Update

Note that this will destroy all the information you have on the hard drive!

Testdisk 7

badblocks won’t copy the information to memory, and than back to disk. It simple destroys it. The point of running a write-enabled badblocks check is forcing the hard drive to remap the damaged sectors. Hard drives have a reserved space to use when bad blocks are found. The bad blocks are remapped to that reserved space, until it fills. And this will only happen on a write. So, run badblocks in write mode, and then again in read-only mode. If badblocks finds no bad blocks, your hard drive is fine (for now). If badblocks still finds bad blocks, it means that there are so many damaged blocks on the disk surface that the reserved area is full. Forget it, and throw the disk away. It’s useless.