Linux: diff two directory to create patch

diff -b -r -w <DIR1> <DIR2> -N  -x ‘*.o’ -x ‘*.cmd’ -x ‘*.builtin’ -x ‘*.order’ > g_ncm.patch

The -N option copies into the .patch files that exists in only one of the directory.


     Ignore changes in amount of white space.  See White Space.
     Ignore changes that just insert or delete blank lines.  
See Blank Lines.
     When comparing directories, recursively compare any subdirectories
     found.  See Comparing Directories.
     Ignore white space when comparing lines.  See White Space.
     In directory comparison, if a file is found in only one directory,
     treat it as present but empty in the other directory. 
     When comparing directories, ignore files and subdirectories whose
     basenames match PATTERN.  See Comparing Directories.
This entry was posted in Linux and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s