[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
[an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]![]() |
![]() |
![]() |
|||||||||||||||||||||||||
|
|||||||||||||||||||||||||||
![]() |
![]() |
![]() |
Hej Kan man ikke det i C? Jeg har en fil som fx er 4096 bytes stor. Nu vil jeg så gerne mens filen er åben, søge tilbage til et sted, og så klippe resten af filen væk. Noget i retning af fd = open("foo", O_RDWR | O_CREAT); write(fd, &temp, 4096); lseek(fd, 2048, SEEK_SET); trunc(fd); /* hvad skriver jeg her? */ Hvis svaret er at jeg skal kopiere alt over i en anden fil, så duer det ikke. Jeg har max 49 ms til udføre operationen og filen kan nemt være 100MB stor. /hans -- Hamletsgade 4 - 201, DK-2200 København N, Phone: +45 3582 9079 Schou Industries ApS http://schou.dk/ CVR: 26 13 44 39 -------------------------------------------------------------- I spent probably 20 or 30 hours drawing the penguin stuff, and I've spent four or five years writing code, and I'm still known for the penguin a lot more than I am for any of the code. -- Larry Ewing, creator of Tux
![]() |
![]() |
![]() |
||||||||||||
|
||||||||||||||
![]() | ||||||||||||||
|
||||||||||||||
![]() |
![]() |
![]() |