[日常] Linux使用diff来比较目录
16lz
2021-01-22
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.[不显示内容]
比较两个目录的不同:
更多相关文章
- Bash脚本删除目录中多个文件名末尾的'x'字符数量?
- Bash脚本不删除给定目录中的文件
- Linux:目录中的最新文件。
- 对于Linux创建链接时终目录和文件处理的认识
- Linux系统下查看目录大小
- 添用户报错:useradd:警告:此主目录已经存在
- Linux比较两个文件之间的不同
- Linux命令备忘实例(10)——目录管理
- ubuntu下的Samba配置:使每个用户可以用自己的用户名和密码登录自