Re: How to Truncate a file opened by fopen()

Look into the code for the program truncate. :-)

man truncate
TRUNCATE(1)             FreeBSD General Commands Manual        

     truncate -- truncate or extend the length of files

     truncate [-c] -s [+|-]size[K|M|G] file ...
     truncate [-c] -r rfile file ...

     The truncate utility adjusts the length of each regular file given 
on the

     The following options are available:


In FreeBSD


Open source is so nice!

Göran Hasse

Göran Hasse            email: gh raditex se     Tel: 08-6949270
Raditex AB       Fax: 08-4420570
Sickla Alle 7, 1tr                              Mob: 070-5530148
131 34  NACKA, SWEDEN                         OrgNr: 556240-0589

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]