diff options
Diffstat (limited to 'progs/touch/touch.c')
-rw-r--r-- | progs/touch/touch.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/progs/touch/touch.c b/progs/touch/touch.c new file mode 100644 index 0000000..815dae3 --- /dev/null +++ b/progs/touch/touch.c @@ -0,0 +1,13 @@ +#include <unistd.h> +#include <stdlib.h> +#include <fcntl.h> +#include <sys/stat.h> + +int main(int argc, char *argv[]) { + if (!argv[1]) { + write(1, "you IDIOT, you forgot to include the file name, MORON\n", 55); + exit(1); + } + int fd2 = open(argv[1], O_RDWR | O_CREAT, S_IRUSR | S_IRGRP | S_IROTH); + exit(0); +} \ No newline at end of file |