2GB file limit

Christos Ricudis ricudis at paiko.gr
Sun Sep 24 10:39:26 EEST 2000


Hello George!

  On 23 Sep 00, George Andreadakis wrote to All with subject "2GB file limit":

 GA> Thelo na dimioyrgiso file > 2Gb alla mallon einai adinaton!

Spasto se kommatia. Den 8eleis na exeis file > 2gb, 8eleis na exeis data
storage > 2gb. 

Enallaktika, mporeis na xrhsimopoihseis to large file support : 

int trypani,kalamboki;
ssize_t paparouna;
char trombeta[10];
off64_t karamouza;

trypani=open64("/tmp/paparouna",O_RDWR|O_LARGEFILE);
//prosoxh twra, sto reading kai writing : 
karamouza=4597234590723490; 
//diabazoume 10 bytes apo to position 4597234590723490
paparouna=pread64(trypani,&trombeta,10,karamouza); 
for (kalamboki=0;kalamboki<10;trombeta[kalamboki++]++);
//to ksanagrafoume pisw
paparouna=pwrite64(trypani,&trombeta,10,karamouza);

Disclaimer : Den to dokimasa, den kserw an douleyei, aplws to diabasa sto
documentation ths GNU libc. 




--
Christos Ricudis

Stolise ki esy ena dentro gia tis giortes.
Kremase twra ena papa. Mporeis.

--
linux-greek-users mailing list -- http://lists.hellug.gr




More information about the Linux-greek-users mailing list