[日常] Linux使用diff来比较目录
程序员文章站
2022-07-09 18:10:36
Linux diff比较两个目录的不同: diff dir1 dir2 -urNaq -a --text Treat all files as text. -u -U NUM --unified[=NUM] Output NUM (default 3) lines of unified[统一] co ......
Linux diff比较两个目录的不同:
diff dir1 dir2 -urNaq
-a --text Treat all files as text.
-u -U NUM --unified[=NUM] Output NUM (default 3) lines of unified[统一] context.
-u,-U<列数>或--unified=<列数>:以合并的方式来显示文件内容的不同;
-N --new-file Treat absent[缺少] files as empty.
-r --recursive Recursively compare any subdirectories found.
-q --brief Output only whether files differ.[不显示内容]
比较两个目录的不同: