#include #include #include int main(int argc, const char *argv[]) { if (argc != 3) { fprintf(stderr, "usage: mv from to\n"); return 1; } if (rename(argv[1], argv[2]) < 0) { fprintf(stderr, "mv: %s\n", strerror(errno)); return 1; } }