[日常] Linux使用diff来比较目录

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.[不显示内容]

比较两个目录的不同:

 

posted @ 2018-04-02 11:16  唯一客服系统开发笔记  阅读(971)  评论(0编辑  收藏  举报