www.delorie.com/djgpp/doc/libc-2.01/libc_661.html   search  
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.

Example

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


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

  prev next   webmaster     delorie software   privacy  
  Copyright © 1997     Updated Apr 1997