#define _FILE_OFFSET_BITS 64 #include #include #include #include #include int main (int argc, char **argv) { int fd; off_t off; if (argc < 3) { printf ("usage"); exit (1); } fd = open (argv[1], O_RDONLY); if (fd < 0) { perror ("open failed"); exit (1); } off = atoi (argv[2]); if (lseek (fd, off, SEEK_CUR) < off) { perror ("lseek failed"); exit (1); } exit (0); }