git.samba.org
/
tridge
/
junkcode.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
nicer formatting
[tridge/junkcode.git]
/
truncate.c
1
#include <stdio.h>
2
#include <unistd.h>
3
#include <fcntl.h>
4
5
int main(int argc, char *argv[])
6
{
7
int fd;
8
fd = open(argv[1], O_RDWR|O_CREAT|O_TRUNC, 0600);
9
ftruncate(fd, 1);
10
close(fd);
11
}