Find total number of files different in a patch

droidzone ~/android $ grep -n '^\-\-\-' kerneldiff.patch                                                                                                              
2:--- oldkernel/.config 1969-12-31 17:00:00.000000000 -0700                                                                                                           
3341:--- oldkernel/.version     1969-12-31 17:00:00.000000000 -0700                                                                                                   
3346:--- oldkernel/Makefile     2012-09-04 17:06:16.000000000 -0700                                                                                                   
3375:--- oldkernel/Makefile~    1969-12-31 17:00:00.000000000 -0700                                                                                                   
4958:--- oldkernel/Module.symvers       1969-12-31 17:00:00.000000000 -0700                                                                                           
10537:--- oldkernel/include/config/auto.conf    1969-12-31 17:00:00.000000000 -0700                                                                                   
11651:--- oldkernel/include/config/auto.conf.cmd        1969-12-31 17:00:00.000000000 -0700                                                                           
12408:--- oldkernel/include/config/kernel.release       1969-12-31 17:00:00.000000000 -0700                                                                           
12413:--- oldkernel/include/config/tristate.conf        1969-12-31 17:00:00.000000000 -0700                                                                           
12810:--- oldkernel/include/generated/asm-offsets.h     1969-12-31 17:00:00.000000000 -0700                                                                           
12885:--- oldkernel/include/generated/autoconf.h        1969-12-31 17:00:00.000000000 -0700                                                                           
13999:--- oldkernel/include/generated/bounds.h  1969-12-31 17:00:00.000000000 -0700                                                                                   
14017:--- oldkernel/include/generated/compile.h 1969-12-31 17:00:00.000000000 -0700                                                                                   
14028:--- oldkernel/include/generated/mach-types.h      1969-12-31 17:00:00.000000000 -0700                                                                           
28382:--- oldkernel/include/generated/utsrelease.h      1969-12-31 17:00:00.000000000 -0700                                                                           
28387:--- oldkernel/include/linux/version.h     1969-12-31 17:00:00.000000000 -0700                                                                                   
28396:--- oldkernel/scripts/genksyms/keywords.c 1969-12-31 17:00:00.000000000 -0700                                                                                   
28620:--- oldkernel/scripts/genksyms/lex.c      1969-12-31 17:00:00.000000000 -0700                                                                                   
31206:--- oldkernel/scripts/genksyms/parse.c    1969-12-31 17:00:00.000000000 -0700                                                                                   
33730:--- oldkernel/scripts/genksyms/parse.h    1969-12-31 17:00:00.000000000 -0700                                                                                   
33833:--- oldkernel/scripts/kconfig/lex.zconf.c 1969-12-31 17:00:00.000000000 -0700                                                                                   
36273:--- oldkernel/scripts/kconfig/zconf.hash.c        1969-12-31 17:00:00.000000000 -0700                                                                           
36522:--- oldkernel/scripts/kconfig/zconf.tab.c 1969-12-31 17:00:00.000000000 -0700                                                                                   
39031:--- oldkernel/scripts/mod/elfconfig.h     1969-12-31 17:00:00.000000000 -0700

 


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.