Whole document tree
Comparing Directories
You can use
For file names that are in only one of the directories, If the older directory contains one or more large files that are not in the newer directory, you can make the patch smaller by using the `-P' or `--unidirectional-new-file' option instead of `-N'. This option is like `-N' except that it only inserts the contents of files that appear in the second directory but not the first (that is, files that were added). At the top of the patch, write instructions for the user applying the patch to remove the files that were deleted before applying the patch. See section Tips for Making Patch Distributions, for more discussion of making patches for distribution. To ignore some files while comparing directories, use the `-x pattern' or `--exclude=pattern' option. This option ignores any files or subdirectories whose base names match the shell pattern pattern. Unlike in the shell, a period at the start of the base of a file name matches a wildcard at the start of a pattern. You should enclose pattern in quotes so that the shell does not expand it. For example, the option `-x '*.[ao]'' ignores any file whose name ends with `.a' or `.o'. This option accumulates if you specify it more than once. For example, using the options `-x 'RCS' -x '*,v'' ignores any file or subdirectory whose base name is `RCS' or ends with `,v'. If you need to give this option many times, you can instead put the patterns in a file, one pattern per line, and use the `-X file' or `--exclude-from=file' option. If you have been comparing two directories and stopped partway through, later you might want to continue where you left off. You can do this by using the `-S file' or `--starting-file=file' option. This compares only the file file and all alphabetically later files in the topmost directory level. Go to the first, previous, next, last section, table of contents. |