Re: How to read hard disk sectors
Re: How to read hard disk sectors
- Subject: Re: How to read hard disk sectors
- From: Jay Vaughan <email@hidden>
- Date: Tue, 27 Apr 2004 18:48:00 +0200
I'm new to Macintosh platform and I'd really appreciate any help on this.
I need to access hard disk sectors for "read only" purpose.
Are there any APIs to do this?
use the POSIX layer ...
newk# ls /dev/disk*
/dev/disk0 /dev/disk0s1 /dev/disk0s2 /dev/disk1
/dev/disk1s1 /dev/disk1s2
newk# dd count=2 if=/dev/disk0 | hexdump
2+0 records in
2+0 records out
1024 bytes transferred in 0.006564 secs (156005 bytes/sec)
0000000 4552 0200 04a8 5300 0000 0000 0000 0000
0000010 0000 0000 0000 0000 0000 0000 0000 0000
*
0000200 504d 0000 0000 0003 0000 0001 0000 003f
0000210 4170 706c 6500 0000 0000 0000 0000 0000
0000220 0000 0000 0000 0000 0000 0000 0000 0000
0000230 4170 706c 655f 7061 7274 6974 696f 6e5f
0000240 6d61 7000 0000 0000 0000 0000 0000 0000
0000250 0000 0000 0000 003f 0000 0003 0000 0000
0000260 0000 0000 0000 0000 0000 0000 0000 0000
*
00003d0 0000 0000 ffff ffff 0000 0000 0000 0000
00003e0 0000 0000 0000 0000 0000 0000 0000 0000
*
0000400
(you'll need the correct permissions, of course...)
I'll leave it up to you to find the source code to /bin/dd, but it
shouldn't be too hard ...
--
;
Jay Vaughan
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.