Hello!
I would like to ask how to read or write to/from hard disk in C. for example input to program is sector, and output must be the data on this sector, and if sector belong to any file? can anybody help me... please!
Printable View
Hello!
I would like to ask how to read or write to/from hard disk in C. for example input to program is sector, and output must be the data on this sector, and if sector belong to any file? can anybody help me... please!
Which OS
Which compiler
Which file system
Which ....
linux OS distribution kubuntu
gcc compiler
FAT 32 file system
Maybe this?
http://www.nondot.org/sabre/os/articles/FileSystems/
IIRC, you can (as root) open the entire hard disk, eg. "/dev/hda" as a file, and do whatever you want as a single large regular file.
std_disclaimer.h
If you screw this up with inept programming and lose your entire disk, don't blame me for handing you a loaded gun.