diff --git a/.gitignore b/.gitignore index c6127b3..9f57ee1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ # Prerequisites *.d - +build/ # Object files *.o *.ko diff --git a/src/false.c b/src/false.c index 2c99a52..ccbfcdd 100644 --- a/src/false.c +++ b/src/false.c @@ -1 +1 @@ -int main(){return 0;} +int main(){return 1;} diff --git a/src/mv.c b/src/mv.c new file mode 100644 index 0000000..d13d3bd --- /dev/null +++ b/src/mv.c @@ -0,0 +1,12 @@ +#include +int main(int argc, char **argv){ + char fed; + FILE *fp, *fp2; + fp = fopen(argv[1], "r"); + fp2 = fopen(argv[2], "w"); + while((fed=fgetc(fp)) != EOF ) + fputc(fed, fp2); + fclose(fp2); + int after=remove(argv[1]); + return(0); +}