ftruncate
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | ftruncate [2006/10/06 19:08] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | # $EPIC: ftruncate.txt, | ||
+ | ======Synopsis: | ||
+ | $[[ftruncate]](// | ||
+ | |||
+ | ======Technical: | ||
+ | The [[ftruncate]] file causes the // | ||
+ | bytes in size. The file is grown or shrunk as necessary. | ||
+ | shrunk, the data beyond the new file size is irretrievably lost. If the file | ||
+ | is grown, the contents of the new space is unspecified, | ||
+ | nuls (ascii 0). | ||
+ | |||
+ | If the operation succeeds, the empty string is returned. | ||
+ | fails, an error string is returned, suitable for [[echo]]ing. | ||
+ | |||
+ | ======Practical: | ||
+ | This is useful for clearing a logfile that has gotten too big. | ||
+ | |||
+ | ======Returns: | ||
+ | The empty string on success, or an error string on failure. | ||
+ | |||
ftruncate.txt · Last modified: 2006/10/06 19:08 by 127.0.0.1