20.7 Creating a Timestamp File for Selective Backups
Whenever I upgraded to a new version of UNIX, one common problem was making sure I maintained all of the changes made to the standard release of UNIX. Previously, I did an ls -lt ( 16.2 ) in each directory, and then I examined the modification date. The files that were changed have an obviously newer date than the original programs [unless the changed files come from a tar archive, with their original modification dates preserved! - JP ] Even so, finding every change was tedious, as there were dozens of directories to be searched.
A better solution is to create a file as the first step in upgrading. I usually call this FirstFile . find has a -newer option ( 17.8 ) that tests each file and compares the modification date to the newer file. If you then wanted to list all files in /usr that need to be saved when the operating system is upgraded, use:
This could then be used to create a tar ( 19.5 ) or cpio ( 19.9 ) file that would be restored after the upgrade.