CS810D - Advanced Programming in the UNIX Environment Midterm Project Implement the snap(1) command as described in the manual page provided to you at: http://www.cs.stevens.edu/~jschauma/810D/snap.1.pdf As usual, the general homework guidelines apply: http://www.cs.stevens.edu/~jschauma/810D/hw You should accompany the program with a Makefile and, if you have any commentary on your program, a README. The due date for the midterm project is 2008-10-14, at 18:14:59. This is a non-trivial programming assignment -- do not postpone starting to work on this! Try to first get the basics right, then add functionality one by one, always ensuring that the added code did not break any previous functionality. If you're stuck, describe your problem on the mailing list. Considerations for this project: -------------------------------- Any files created in the snapshot directory do of course have the exact same permissions, owners, timestamps etc. as the original files. When performing a complete snapshot, you may choose to simply exec "cp -pR" instead of copying all files yourself. You may NOT do this for individual files while performing incremental snapshots. When performing a cleanup, you may choose to simply exec "rm -fr" instead of unlinking all files yourself. When performing any kinds of snapshot, snap(1) must exclude any directories under ${SNAPDIR}. It is reasonable to stipulate that ${SNAPDIR} must point to a directory outside of the directory being backed up. When determining the last full snapshot, you may consider implementing a symlink "${SNAPDIR}/full/last" pointing to the relevant directory. Extra credit: ------------- The following are ways to gain extra-credit. Please only start working on these features if you are satisfied with the basic functionality. snap(1) bases its decision whether or not a file should be included in an incremental snapshot entirely on timestamps. You may choose to implement more advanced mechanisms to determine whether or not a given file has changed (and thus needs to be included in the incremental snapshot). Some possibilities include: - size of the file (+2 points) - different data at the beginning, in a random place in or at the end of file or by comparing checksums of the files (+5) I'll make available a host running a different version of unix than NetBSD or Linux. Most likely this will be Solaris 10. Making your code work on that host will be rewarded with 15 points. If the user sends SIGINFO to the process, snap(1) will print a status message indicating how many files have been processed/copied. Something along the lines of "Processing files... 122/809" or "15% complete" etc. (+5)