Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- libc - <b>truncate</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
truncate
========

Syntax
------

     #include <unistd.h>
     
     int truncate(const char *file, off_t size);

Description
-----------

This function truncates FILE to SIZE bytes.

Return Value
------------

Zero on success, nonzero on failure.

Example
-------

     ftruncate("/tmp/data.txt", 400);


Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson