Very simple implementations of some UNIX utilities in C for self-educational purposes.
cat
cat_1.c
: Very naivecat
implementation without flags nor usinggetopt
. Emits compiler warnings.
cp
cp_1.c
: Very naivecp
implementation without flags nor usinggetopt
. Can only copy one file to one destination. Does not emit compiler warnings.
rm
rm_1.c
: Very naiverm
implementation without flags nor usinggetopt
. Can only remove one file. Does not emit compiler warnings with-Wall
flag.
find
find_1.c
: Very naivefind
implementation without flags nor usinggetopt
. Emits compiler warnings. Receives a path that will be traversed recursively and a substring to look for in each result. Case dependent.
- Remember that
#include "file.c"
could load functions from external files.