use getopt to parse command line arguments. use err(), errx(), etc. for error messages. include appropriate header files for function prototypes. return 0 on successfull exit instead of dropping off the end of main().
note that it's in /bin rather than /usr/bin. wouldn't want to be screwed trying to restore a backup...