Go to the first, previous, next, last section, table of contents.


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.

Portability

not ANSI, not POSIX

Example

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


Go to the first, previous, next, last section, table of contents.