how do i read a block

shampavman shampavman.cg at gmail.com
Mon May 13 04:05:54 EDT 2013


Hi all,

Supposing i create a file of size 10K, it will occupy 2 blocks (4K each).
Now if i want to read only 1 block from it how can i do it?

read(fd, buf, 4096) ;
would this mean i would read the first block and all its contents?

Thanks




More information about the Kernelnewbies mailing list