title: understand read() in Linux
body: <p>I am looking at the man-page for read(int fd, void *buf, size_t count)</p>
  
  <p><a href="http://man7.org/linux/man-pages/man2/read.2.html" rel="nofollow">http://man7.org/linux/man-pages/man2/read.2.html</a></p>
  
  <p>where I need some more explanation on the words "On files that support seeking, the read operation commences at the current file offset, and the file offset is incremented by the number of bytes read. "</p>
  
  <p>1) If I want to read a file not from the beginning, say at offset 100 (bytes) to read 1 byte, is the offset 100 added to the fd, i.e, read(fd+100, buf, 1)? If not, how can I specify the offset in the code?</p>
  
  <p>2) How do I know if "files support seeking"? I "opened" the FPGA as a spi device through spi bus, to get the fd. I am using read() to read registers of FPGA. In this case, is the file support seeking?</p>
  
  <p>Thanks!</p>