diff --git a/apps/write-out.c b/apps/write-out.c index 5dc256bc..bbc54048 100644 --- a/apps/write-out.c +++ b/apps/write-out.c @@ -3,7 +3,7 @@ #include int main(int argc, char * argv[]) { - int fd = open(argv[1], O_WRONLY | O_CREAT, 0666); + int fd = open(argv[1], O_WRONLY | O_CREAT | O_TRUNC, 0666); while (1) { char buf[1024];